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 11 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:

01while true do
02    b = game.Workspace.Rocking Chair
03    wait(.3)
04    b.Rotation = Vector3.new(1,0,0)
05    wait(.3)
06    b.Rotation = Vector3.new(2,0,0)
07    wait(.3)
08    b.Rotation = Vector3.new(3,0,0)
09    wait(.3)
10    b.Rotation = Vector3.new(4,0,0)
11    wait(.3)
12    b.Rotation = Vector3.new(3,0,0)
13    wait(.3)
14    b.Rotation = Vector3.new(2,0,0)
15    wait(.3)
16    b.Rotation = Vector3.new(1,0,0)
17    wait(.3)
18end

Answer this question