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 smoothly transition one Cframeto another?

I'm trying to make a Cframe smoothly change basically like TweenService. I tried tweening it but it doesn't work, if someone could help me I would be really grateful

Start as CFrame.new(0,-0.2,-0.4) End as CFrame.new(-0.273,-0.052,0.2)

2 answers

✓ Accepted answer

You can lerp through it

local RunService = game:GetService("RunService")
local StartCF, EndCF = CFrame.new(2,5,1), CFrame.new(8,12,9)
local CFHolder = StartCF

for i = 0,1,0.01 do
	CFHolder = StartCF:Lerp(EndCF, i)
	RunService.Heartbeat:Wait()
end

1 comment

0

Thanks!

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