I am trying to create a simple “climbing animation”: where the player climbs down a truss to the next level.
Though, what ever I try to do it seems as though I cannot make the player climb down for some reason.
What i’ve tried:
- PathfindingService - won’t detect the truss
- humanoid:MoveTo - only climbs up
- player:Move - only climbs up
Here’s my current implementation of the code:
--play ladder climb animation
Controls:Disable()
humanoid:MoveTo(exit.PathFindableLocation.Position)
connection = humanoid.MoveToFinished:Connect(function()
connection:Disconnect()
wait(0.5)
player.Character:PivotTo(exit.PivotLocation.CFrame)
local climbing = false
connection = humanoid.StateChanged:Connect(function(_,state)
if state == Enum.HumanoidStateType.Climbing then
climbing = true
connection:Disconnect()
wait(1)
player:Move(Vector3.new(0,0, 50), false)
end
end)
while not climbing do
player:Move(Vector3.new(0,0, -1), false)
wait()
end
end)
Below is an example of what I am trying to achieve.