Over the last few months, I’ve been obsessed with making a ski resort in Roblox. But there is no ski resort without a good, functioning lift. Basically, it would be best if there was an un-anchored part that was able to move uphill on a cord. Anyone know how to do this?
Good examples are Pine hill Ski resort,
and Nieder Alp ski resort
There is a youtube tutorial that breaks down all the steps about spawning them, following a path, etc. It is a great resource if it is your first time making the mechanics of a lift. Just search like “How to make a ski lift in roblox studio”
My apologies, one method I could think of is by creating a sort of “Chain” of points then interpolating from point A to point A + 1 (modulus ofc). Based on the distance between one point to another you can calculate the baseSpeed of the ski lifts’ anchor.
Here’s a script and a video that kind of demonstate a basic example of a ski list, obviously a better way is to use bezier curves so it interpolates but it’s pretty much just based on interpolating between points.
local runService = game:GetService("RunService")
local points = workspace:WaitForChild("Points")
local children = points:GetChildren()
local main = workspace:WaitForChild("Main")
local baseSpeed = 4
local current = 1
local interval_time = 0
function lerp(a, b, t) return a + (b - a) * t end
function cont_modulus(n: number, g: number) return n % g == 0 and g or n % g end
function getPoint(n: number)
return points:FindFirstChild( tostring(cont_modulus(n, #children)) )
end
runService:BindToRenderStep("ski rail", Enum.RenderPriority.Camera.Value, function(delta: number)
if interval_time >= 1 then
current = cont_modulus(current + 1, #children); interval_time = 0
return
end
print(interval_time)
local point_0, point_1 = getPoint(current), getPoint(current + 1)
local p0, p1 = point_0.Position, point_1.Position
local distance = (p0 - p1).Magnitude
interval_time += (baseSpeed * delta) / distance
main.CFrame = CFrame.new( lerp(p0, p1, interval_time) ) * CFrame.lookAt(p0, p1).Rotation
end)