Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I rotate a brick using while loops?

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

1 comment

0

CFrame, Rotation.

2 answers

✓ Accepted answer
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

while wait() do
script.Parent.Rotation = script.Parent.Rotation + Vector3.new(0,0,1)--change to where to rotate.
end

This discussion is preserved as it was. New answers, comments, and votes are closed.