How would I go about making a rail grinding system in my game?

I’m making a platformer game, and I want to implement a way for players to gain speed, and so I thought of adding a rail grinding system. The issue with this though is that I’m not very sure how I should go about developing this into my game. Where should I start?

1 Like

Hey StarJ3M, this is an intriguing thing you can script! There are many free tools that you can use inside of the Roblox DevForum, such as Zone, which allows you to get any touching parts via a simple module. To answer your question, you can use Zone or a Touched connection on a “Rail” and check for the players object (the skateboard) having a specific magnitude of velocity and then apply the Rail ability to it (Grinding). Have the player follow the rail position until they fail to balance or hit the end of the rail, at which point you break or stop the function or script that is keeping them grinding. Of course there are more ways or even better ways to do this, like via raycasting, but this would be an easier route to take. Reply if you need any further help or information!

1 Like

Some of this information has helped me definitely , but the thing is I don’t want to make rail grinding for a skateboard, but it will be for the player, like something in Sonic Adventure 2.

Can you get video of the “Rail Grinding” in action?

Something like this

(31) rail grind test - YouTube

Could you possibly share how you accomplished this? It looks great. I have an implementation right which works, but this looksuch better. Does it work going around corners too or just straight rails?

Um… I didn’t make the video at all and was instead using it as an example video for how I would want the rail grinding system I was making to be.

Gotcha. Have you made any progress? I have revamped my system.

For my rail I have a bunch of different points on the rail and each point has an ObjectValue instance for forward and backward which hold the point before and after the current point

Then when the player jumps on the rail, I create a mover part which just gets cframed to each point on the rail by using the forward/backward ObjectValues depending on which direction they are going.

I then place an AlignPosition in the players character and attach it to an attachment on the player and an attachment the mover part which keeps the player synced to the mover part.

Sadly no, I ended up moving on to a different project entirely, and so the game that this mechanic was supposed to be featured in now is on an indefinite hiatus, so I won’t be much help. D: