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

How do I do this?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

So, you know how you can make something continuously move, even through blocks by doing this?

local part = script.Parent

while true do
    part.CFrame = part.CFrame * CFrame.new(0,1,0)
        wait(.01)
end

I wanted to know whether or not it was possible to make something keep rotating forever, using the CFrame.Angles. That way it would be rotating inside of a different block forever. If my question doesn't make sense, or it's not possible, just comment!

Thanks for the help!

1 answer

Log in to vote
2
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

Yes, of course, and it's almost the same code:

while true do
    wait(.03)
    -- Note that usually wait will not wait for less than .03 seconds
    part.CFrame = part.CFrame * CFrame.Angles(0, 0.1, 0);
    -- Spins around its top
end
0
:D Lightdrago 95 — 9y
Ad

Answer this question