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?