[SOLVED] Trying To Make Slide Mechanic Similar To RIVALS

Luckily, this issue has been resolved :slight_smile:

3 Likes

For more context, my current sliding system (the script i provided above) tends to clip the player into slopes when sliding up them, and the player sliding forward off a slope instead of down it.

1 Like

You’ll want to detect the surface the player is touching and rotate the animation to be parallel.

Maybe calc your position delta in small increments to get the Vector parallel to the surface you are on and rotate the animation that way.

1 Like

The reason it would be doing this is because when you set the velocity, you are making it move forward no matter if an object is in front or not. So what you need to do is detect if there is a surface that it is on that isn’t horizontal and then rotate the player so that they are adjacent to that surface.

1 Like

@ModernWarSciFite @baadtiger

i’ve taken ur suggestions into consideration, tho after trying a few methods to do so, they haven’t seemed to work, maybe I’m not using right methods but I’m not sure

1 Like

Can you show us how you have tried to do it?

1 Like

Here’s a few methods i’ve tried:

(i’m not sure which ones, but some of the methods crashed my studio multiple times when i tried to run them, i probably wasn’t supposed to use them in a loop.)

1 Like

You need to make it so that it always happens, which I would assume would be in an infinite loop. When making an infinite loop, make sure that there is at least one wait statement of any length so that your game doesn’t crash.
I would recommend trying again but making sure it doesn’t crash, as these codes look as though they work.

1 Like

yea, im pretty sure these ones work fine, but some other ones made it crash, even when i put a task.wait() so im not sure, i’ll try seeing if i can get one of the methods working.

1 Like

Okay let me know what happens.

Alright, will do

(blahblablah)

1 Like


Alright, i managed to get it working! it took a few hours but i managed to get it to a stable degree (the floating character occurs on the client when sliding, tho it won’t be a issue as my game is gonna be first person.)

Good job. How’s sliding down slopes look?
I believe your intention was for the player to stick to the surface so that they do not slide off the top of a ramp but rather slide down with it.

Nice work! I hope all my advice helped!
Good luck with your game! (and make sure that when there was a solution, that you mark it as a solution so it doesn’t take up space).

for my use case i wanted the player to kinda be propelled into the air when jumping after sliding up a ramp, i’m gonna continue polishing it as the player does not slide down slopes unfortunately, so I’m gonna try using some raycasting and a VectorForce

yep, i have marked my previous reply as the solution, and thank you and @ModernWarSciFite for the help! as i was able to understand better what my problem was.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.