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

How do I rotate a brick using while loops?

Asked by
neoG457 315 Moderation Voter
10 years ago

I want to make a brick continuously turn round without stoping.

0
CFrame, Rotation. systematicaddict 295 — 10y

2 answers

Log in to vote
0
Answered by
duckwit 1404 Moderation Voter
10 years ago
while wait() do
    part.CFrame = part.CFrame * CFrame.Angles(math.rad(x), math.rad(y), math.rad(z))
end

Where x, y, and z are the angles of rotation in degrees, i.e. how much the brick should rotate by for each 1/30th of a second

Ad
Log in to vote
0
Answered by 10 years ago
while wait() do
script.Parent.Rotation = script.Parent.Rotation + Vector3.new(0,0,1)--change to where to rotate.
end

Answer this question