I've been at this for a while and this may be a stupid questions but I'd like some help.

local Part1 = script.Parent.Pri
local Part2 = script.Parent.Part
local Model = script.Parent
Model.PrimaryPart = Part1
local Primary = Model.PrimaryPart
local Endpoint = game.Workspace.Endpoint.CFrame
for i = 0,1,0.01 do
	Model:SetPrimaryPartCFrame(Model:GetPrimaryPartCFrame():Lerp(Endpoint,i))
	wait()
end

I tried to change the 0.01 but that didn't do anything. It does move but in 1 second intervals and it's not looking smooth. Could someone tell me what I'm doing wrong? Thanks!

2 comments

0

Instead of wait() use RunService with RenderStepped. That way, it runs with the frames instead of desynced. game:GetService("RunService").RenderStepped:Wait(). This will call wait() until the next frame is loaded

0

Try using TweenService.