This does what I want it to do, but it obviously looks really weird since the player gets teleported twice. It could just be that I’m being stupid, but that’s for you to decide. Any help is appreciated!
Well instead of teleporting the player twice, you could calculate the position where the player should be place
-- Assuming v is the red circle's part
local lineDirection = (v.Position - lowestPoint.Position).Unit
local playerPosition = v.Position - lineDirection * (distance / 2)
humanoid.RootPart.CFrame = CFrame.new(playerPosition)
It only seems to work when the player is looking in a certain direction. I should’ve also clarified that v is the line. Lowestpoint is the point that is the lowest of the 2. There’s 1 point on each end of the line.
So the CFrame calculation needed to be adjusted. Sorry about that
-- Assuming v is the red circle's part representing the line
local lineDirection = (v.Position - lowestPoint.Position).Unit
local playerPosition = v.Position - lineDirection * (distance / 2)
local lookAtPosition = v.Position + lineDirection * (distance / 2) -- Adjust to look along the line
humanoid.RootPart.CFrame = CFrame.new(playerPosition, lookAtPosition)
Hm, the same issue occurs, where it only works if I look away from the lowest point and towards the highest point. If I look away from the highest point it just teleports me into the lowest point. Tell me if you need any more clarification, and thanks for the help.
So basically, I’m making a zipline system, where you can attach to a zipline at any location of the line. I’m just having trouble positioning the player onto the zipline itself.