# Ziplines broken! Need help!

Hello! This topic has been posed before but I didn’t get any good answers. I am making a zipline for my FE2 fangame! And the zipline keeps changing speed the larger it is. I don’t know why because all the values are numbers.

The code where the player moves:

``````local bodyPos = Instance.new("BodyPosition", plr.Character.HumanoidRootPart)
bodyPos.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyPos.P = 5000
bodyPos.D = 50

local bodyGy = Instance.new("BodyGyro", plr.Character.HumanoidRootPart)
bodyGy.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
bodyGy.D = 50
bodyGy.P = 5000

humAnim:Play()

game.SoundService.ZiplineOn.Playing = true
game.SoundService.Zipline.Playing = true

local posPoints = {}
for i=1, #points do
table.insert(posPoints, points[i].Position)
end
local inc = 0.007
for t = 0, 1 - inc, inc do
local pos = Bezier.GetBezierPoint(t, unpack(posPoints))
local nextPos = Bezier.GetBezierPoint(t + 0.07, unpack(posPoints))
local this = CFrame.new(pos, nextPos) * CFrame.new(0, 0, -1)
bodyPos.Position = this.Position - Vector3.new(0,2.55,0)
bodyGy.CFrame = this - Vector3.new(0,2.55,0)
part.CFrame = this
game:GetService("RunService").RenderStepped:Wait()
end
``````

Can anyone help?

It looks like this script uses point values then applies a body mover to that point. As you increase the size of the zip line without changing the point values, the distance increases and you end up needing more force to travel the longer distance. I recommend writing your own zipline script using Lerping instead.

So I decided to keep the old script intact. Thanks for trying to help me however!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.