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

How would I rotate a brick without it being choppy?

When I used a this script to rotate a part it ends up looking very choppy or rugged so is there a better way to make it look smooth?

while true do
	script.Parent.CFrame = script.Parent.CFrame*CFrame.Angles(0,math.rad(7.2),0)
	wait(.02)
end

I don't know if my computer is just straight up bad or if there's a better way

1 comment

0

choppy? Please define it

2 answers

✓ Accepted answer
while true do
	script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0.07,0)
	wait(0.05)
end

4 comments

0

upvote pls :)

0

Do NOT forget the math.rad.

0

isnt this the same as CFrame * CFrame.Angles?

0

Not all angles are the same

If you want very smooth way to rotate bricks, use bodyangularvelocity. First off, create a bodyangularvelocity, a bodyvelocity and a script inside the brick.

BodyAngularVelocity = script.Parent.BodyAngularVelocity -- This is a variable that will represent the bodyangularvelocity instance.
BodyVelocity = script.Parent.BodyAngularVelocity -- This is a variable that will represent the bodyvelocity instance.
BodyAngularVelocity.MaxTorque = Vector3.new(math.huge, math.huge, math.huge) -- This will set the torque to maximum, so it doesn't glitch with other physics.
BodyAngularVelocity.AngularVelocity = Vector3.new(2, 2, 2) -- This will make the brick rotate 2 studs per second on all axis.
BodyAngularVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) -- This will set the bodyvelocity force to maximum so the brick can be kept in air.

If this helped, please click the accept answer button.

2 comments

0

Sorry but the Angular velocity doesnt seem to be making the brick rotate

0

Oops, forgot to say that you have to unanchor the brick

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