Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there another way to remotely call this function?

Asked by 3 years ago

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.

0
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 radiant_Light203 1166 — 3y

Answer this question