Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I rotate a model in a loop?

Asked by 10 years ago

I want to rotate a model of a rocking chair back and forth so it looks like it's rocking. I've already tried this:

while true do
    b = game.Workspace.Rocking Chair
    wait(.3)
    b.Rotation = Vector3.new(1,0,0)
    wait(.3)
    b.Rotation = Vector3.new(2,0,0)
    wait(.3)
    b.Rotation = Vector3.new(3,0,0)
    wait(.3)
    b.Rotation = Vector3.new(4,0,0)
    wait(.3)
    b.Rotation = Vector3.new(3,0,0)
    wait(.3)
    b.Rotation = Vector3.new(2,0,0)
    wait(.3)
    b.Rotation = Vector3.new(1,0,0)
    wait(.3)
end

Answer this question