So as some people may know, I love to goof around.
And today I decided I want to make stuff involving movement.
So how would I make a sliding system?
I want to find out how to make a system that can:
- A: Make the player be able to slide forwards
- B: Make it so once they start sliding, the player cant change the direction they are moving in until after the slide
- C: Make it so when the press a button(Lets say SPACE) it cancels out the sliding.
Thanks!
~Froyo~
I am not asking for an entire script. Rather asking how I would get something like this done.
Tutorials or anything like one are except able. As long as I can learn how it works
So I would recommend making an animation. Just use UIS or CAS to detect key inputs. Copy the Humanoid.MoveDirection and consistently move the player in that direction with a velocity or by just setting the CFrame. You could also put some effects on their feet and stuff.
1 Like
For making the player slide forward, I would use MoveTo()
and add the position of the rootpart
to the MoveDirection
and multiply it by any speed
(Ex: 26 would be your sliding speed), and bind it to RenderStepped
so the character can’t move in any other direction. After a certain amount of time has passed, I would break the loop and move it to the current position of the rootpart
MoveTo(rootpart.Position)
.
And inside the loop, I would connect the Jump
property to see if it has jumped, if it’s true, break the loop.
And ofc, change the HipHeight and set PlatformStand to true, and resize the rootpart
, so it can slide under objects properly.
1 Like
And for the velocity, you can look on my other post of using an AlignPosition.
2 Likes