What I want to do is to make a system where if the player moves, the amount of steps the player can take goes down. If the player reaches 0 steps, they die. If the player stops moving for a certain amount of time, their steps go up gradually. Of course, I would want to display this visually for the player to see. I tried having the text change on platform move but the steps wouldn't stop going down after the player stopped moving. I attempted to make a system to stop the steps from going down when the player isn't moving, but to no avail.
I've linked the project here. Any help would be great. :)
drive.google.com/file/d/16Jq29BiYxntLV5Q3vTpiEbDq3qLVPlk1/view