How to move a part using RunService.Stepped?

So you’d use Linear Interpolation

local RunService = game:GetService("RunService");


local function MovePart(A,B, Part, Time)
	local Start = tick();
	while tick() < Start + Time do
		Part.CFrame = CFrame.new(A:Lerp(B,(tick()-Start)/Time)) ;
		RunService.Stepped:Wait();
	end
	Part.CFrame = CFrame.new(B);
end


2 Likes