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

Spinning Object doesn't work?

Asked by 10 years ago

So I have a alarm that spins. The output says Workspace.Alarm1.Script:6: bad argument #3 to 'Rotation' (Vector3 expected, got number). Why?

Alarm1 = game.Workspace.Alarm1
Rotation = Alarm1.Rotation
x = 0.05

while true do
    Alarm1.Rotation = 0, -0, 0
    wait(x)
    Alarm1.Rotation = 0, -15, 0
    wait(x)
    Alarm1.Rotation = 0, -30, 0
    wait(x)
    Alarm1.Rotation = 0, -45, 0
    wait(x)
    Alarm1.Rotation = 0, -60, 0
    wait(x)
    Alarm1.Rotation = 0, -75, 0
    wait(x)
    Alarm1.Rotation = 0, -89.952, 0
    wait(x)
    Alarm1.Rotation = 180, -75, -180
    wait(x)
    Alarm1.Rotation = -180, -60, -180
    wait(x)
    Alarm1.Rotation = -180, -45, -180
    wait(x)
    Alarm1.Rotaion = -180, -30, -180
    wait(x)
    Alarm1.Rotation = -180, -15, -180
    wait(x)
    Alarm1.Rotaion = -180, 0, -180
end

1 answer

Log in to vote
0
Answered by
ultrabug 306 Moderation Voter
10 years ago

It says it got a number because you didn't make the number a vector3 value, before the numbers put Vector3.new(numbers here).

Ad

Answer this question