Hello, I need some help for a “Cube” doing something (E.g. Give Money) if the player is standing in it and that process will repeat every second till the player leaves the “Cube”.
If you can help, Thank you!
Make sure the “Cube” has a collider, set as a trigger.
To make it give money every second, I would set a boolean to true on OnTriggerEnter, and false in OnTriggerExit
Then in an update method, if the boolean is true, count down the 1 second timer, when it hits 0, give the money and reset the timer.
Hope this helps,
-Larry