【发布时间】:2020-11-15 17:42:46
【问题描述】:
我如何将玩家 8 个螺柱沿玩家所面对的方向平滑移动 20 毫秒(如此过渡)?
script.Parent.Activated:Connect(function()
--[This is because this is a localscript in a tool]
end)
【问题讨论】:
标签: roblox
我如何将玩家 8 个螺柱沿玩家所面对的方向平滑移动 20 毫秒(如此过渡)?
script.Parent.Activated:Connect(function()
--[This is because this is a localscript in a tool]
end)
【问题讨论】:
标签: roblox
local isGliding = false;
script.Parent.Activated:Connect(function()
isGliding = not isGliding;
local char = script.Parent.Parent; --The tool gets inside of the char when activated
local humanoidRootPart = char:WaitForChild("HumanoidRootPart");
coroutine.wrap(function()
while true do
humanoidRootPart.Positon += humanoidRootPart.LookVector * 8;
wait(0.3)
if isGliding == false then
break;
end
end
end)()
end)
大概是这样的。这应该在工具下的一个 ServerScript 中。
【讨论】: