How to make the player grind?

I am working on an indie game and me and my team are in pre production. I am starting to put together a test build for testing the game mechanics. As soon as the player jumps on top of a rail, I want them to be in a grinding state, doing their grind animation and moving like they are grinding.

Give the rail a collision box set as a trigger and have a trigger on the bottom of the player's skateboard. When the board trigger comes in contact with the rail trigger, then have it switch to the grind state and play your grinding animation.

You could have a whole array of states the player can be in and a whole set of triggers in the level that fire off certain states. so for grinding for instance, you would set a collision box with a trigger that fires "grind" on rails, curbs, boxes, etc.