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

How to smoothly orientate?

So I already know using Orientation you can rotate an element via script but the thing is it is very snappy. How would I achieve this smoothly? Linear Algebra?

5 comments

0

CFrame.Angles()

0

Don’t use orientation as it accounts for collisions with the part. You need to directly change the part’s CFrame. To make it smooth, you might want to try TweenService.

0

You don't need to use CFrame. You can still rotate it smoothly without it.

0

CFrame is just one way. You can also use BodyAngularVelocity.

1 answer

✓ Accepted answer

This is one-way:

local part = script.Parent
local speed = 3 -- Speed at which the part will rotate.

while true do
	part.Orientation = part.Orientation + Vector3.new(0, speed, 0) -- Set the rotation every 0.01 seconds.
	wait(0.01)
end

1 comment

0

Thanks

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