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

Is there a way to turn a part smoothly, just like it moves smoothly using bodyposition?

You know when you use bodyposition to move a part to a spot, it glides through the air.

1 answer

You can use CFrame lerp.

local Pos1 = CFrame.new() -- Start position
local Pos2 = CFrame.new(Vector3.new(10, 10, 10)) -- End position

for i = 0, 1, 0.01 do
	Part.CFrame = Pos1:lerp(Pos2, i) -- transitions the part from Pos1 to Pos2
	wait()
end

1 comment

0

this method can work on unanchored and anchored parts.

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