Is there a way to subtract points from a player’s health if they are doing a certain action? So if a player swims or flies it uses more energy the more they swim or fly. It’s different than a collision since I don’t want a point subtracted every time they collide with the water or whenever they’re not on the ground.
The point of this is to discourage the player from flying the whole time since it uses more energy (this is an educational aspect of the game). I appreciate any input!
Thank you! Your code works with the switch set to on, but it only seems to work the first time. After one instance of flying, the switch doesn’t turn on anymore. Do I need to connect something else so it is turned on when the raycast “misses”?