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

How do you make a rotating script?

Asked by 10 years ago

I'm good at JavaScripting, so I thought I was good at this. But I just figured out it's VERY different! There are some new terms. Can someone make a script that can rotate a model automatically so I can have spinning cogs?

1 answer

Log in to vote
0
Answered by 10 years ago
while wait() do
    part.CFrame = part.CFrame * CFrame.Angles(0, math.rad(5), 0)
end

That will rotate the part 5 degrees on the relative Y axis every 1/ 30 of a second.

0
I just realized you said model. That will only rotate a single part. :P PsychoWaffle 10 — 10y
Ad

Answer this question