So in my game, I want a healing system to wait 10 seconds before healing, and that can be reset by taking damage or eating food. The (most likely inefficient) way I was planning to get this done was: The player has a boolvalue, and if that is set to true, immediately set it to false and run the code. Is there another way to do this? I don't want to use RemoteEvents, as those are server-to-client and vice versa only, and I am most likely going to run this from the same player's local scripts. Any push in the right direction would be great.
COMMUNITY QUESTION
Is there another way to remotely call this function?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
There is a form of remote events called bindable events that run only in one environment. They function similar to remote events as in they act as a signal for scripts but work either locally or server-sided and never cross the boundary. Read more here: https://developer.roblox.com/en-us/api-reference/class/BindableEvent