I am trying to make a wall running system similar to the one in Robot 64, as shown here: Roblox 2024-06-03 13-31-32 on Vimeo
I want the player to be able to walk up a wall for a bit before falling down, and be able to run sideways while on the wall before falling slowly towards the ground.
The problem is, I do not know how to go about this. I want the player to be sort of “rotated” while running on the wall. I have tried editing the properties of the character manually when they touch a wall, for example in a script:
local char = game.Players.LocalPlayer.Character
char["Left Foot"].Touched:Connect(function(part)
if part.Name == "Wall" then
char.HumanoidRootPart.Orientation = Vector3.new(0, 0, -90)
end
end)
However, there are four problems with this:
- I do not know how to find out which way to rotate the player
- The transition from on the ground walking to walking on the wall would not be smooth like in the video
- The script only rotates the player’s HumanoidRootPart and does not rotate the player’s whole character.
- I know that the .Touched function is not very reliable and could cause bugs such as the player being rotated while still on the floor.
I have tried many posts and videos, including this one: https://www.youtube.com/watch?v=Myw0BaMrriI
But none of them were able to match what I was going for.
Also, to mention, I am working with a custom character, that looks like this:
I want the player to be able to fall if they lose momentum and slowly run towards the ground while running on a wall, similar to in the video. I also want them to get a little boost when they first make contact with the wall.
Any ideas on how to achieve this?
Thanks!