I have a part that rotates along the Z axis but it stops at a certain point, and I don’t know how to avoid it. Any help is appreciated.
while wait() do
script.Parent.Orientation = script.Parent.Orientation + Vector3.new(-8,0,0)
end
I have a part that rotates along the Z axis but it stops at a certain point, and I don’t know how to avoid it. Any help is appreciated.
while wait() do
script.Parent.Orientation = script.Parent.Orientation + Vector3.new(-8,0,0)
end
Use CFrame, not Orientation. Orientation have limit. Here is code
while task.wait() do
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(-8),0, 0)
end
You would instead use CFrame for this. As what @PhantomGame_Youtube said, orientation will only get you so far.
while true do
-- *= operator makes things simpler and more compact. epic luau moment
script.Parent.CFrame *= CFrame.fromEulerAnglesXYZ(-8,0,0)
task.wait(0.0333) -- 1/30th of a second (0.01667 is 1/60th of a second)
end