当我更改右腿的Z轴的方向时,它将在随机方向上移动。我不知道该怎么做。 Example Image我的右腿移动代码:
local function animLegs()
local switch = false
if switch == false then
oy = oy + .1
rleg.Orientation = Vector3.new(rleg.Orientation.X,rleg.Orientation.Z,oy)
if rleg.Orientation.Y == .8 then
switch = true
print("switch")
end
elseif switch == true then
oy = oy - .1
rleg.Orientation = Vector3.new(rleg.Orientation.X,oy,rleg.Orientation.Z)
if rleg.Orientation.Y == .5 then
switch = false
print("switch2")
end
end
wait(.001)
end
我在做什么错了?