Hey, I’ve been working on a wall running script recently and I can’t really figure out a good way to make the player actually run on the wall (like run without falling). So far I’ve got two raycasts on either side of the player checking for a wall which upon returning true will move the player forwards until they either look away from the wall or jump. This all works fine but I’m not sure how to make the player not fall while touching the wall. Currently my only solutions are spawning invisible parts under them, which probably is not very efficient, or doing something with VectorForce to negate gravity on the player but I am not sure how to go about doing this. Are there any other ways to achieve something like this?
Maybe putting the body velocity in the humanoid root part orr body force
I would say to use some sort of body mover, Body Velocities, Body Forces, etc.
You could maybe instance a Body Velocity and make the maxForce property 4000,4000,4000 which should be the default when you instance one. This make the character stay in the air and then play around with Body Velocity settings for velocity. For example you could say:
local bodyVelocity = Instance.new("BodyVelocity", character.HumanoidRootPart) -- this is just some random variable I made you have to make sure you actually have a variable for the player's character and put it here
bodyVelocity.MaxForce = Vector3.new(4000,4000,4000) `-- make sure to experiment with this
bodyVelocity.Velocity = Vector3.new(0,0,0) -- make sure to experiment with this
1 Like