Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a Lerp Coaster System?

Asked by 5 years ago
Edited 5 years ago

I want to make a coaster that runs smoothly following a path of bricks using Lerp / Cframe.

Roblox physics are not longer working for me, i've been trying to finish my coaster but its not working at all due to roblox physics.

I named the rails in order but i have no clue what to do next.

I have this code but its not working at all for me, is it possible to make a coaster run smoothly without using roblox physics using Lerp / Cframe that follows the rails?

Code:

local Model = script.Parent

for i = 0,1,0.0001 do
    Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame:lerp(markers.POS2.CFrame, i))
    wait()
end
end

Answer this question