Hello, DevForums! I was trying to make a wall climbing system and everything is working right now. However there is an issue that arises when I try to move horizontally on the wall. While it works in the front to press A and D to move horizontally on the wall, on the back of the wall, the controls are inverted and on the sides, it causes the player to float off the walls. I have tried to get the direction of where the player is facing to change the body velocity accordingly, but have no idea on how to get the direction that the character is facing.
1 Like
Use CFrame.LookVector
local char = script.Parent -- Define your character
local head = char:FindFirstChild('Head') -- You can also use Humanoid Root Part
local wayIsFacing = head.CFrame.LookVector
-- I'm adding a body velocity and multiplying it by a number * way it is facing.
bv.Velocity = wayIsFacing * 10
Just switch the controls.
Hope this helps!
The script causes me to move forward where the player is facing, and I need them to move to the side based on where they are looking to prevent inverted controls.