i made a teleport dash system which uses linear velocity to move the player. it works fine when you do it the normal way, like the first 2 dashes shown in the video, but when you move your camera around you go way way faster. is there any way to fix this? heres the video of the problem and the code
local att = Instance.new("Attachment", hrp)
att.Axis = Vector3.new(-90,0,0)
local vel = Instance.new("LinearVelocity")
vel.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
vel.LineDirection = hrp.CFrame.RightVector * -1
vel.LineVelocity = 125
vel.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
vel.Attachment0 = att
vel.MaxForce = math.huge
vel.Parent = hrp
local track = TS:Create(vel, TweenInfo.new(.6, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0, false, .2), {LineVelocity = 0})
track:Play()
track.Completed:Connect(function()
track:Destroy()
att:Destroy()
vel:Destroy()
end)