Milllk 59 Report post Posted September 19, 2015 how can i set cooldown for invoking a function like this,i have a function here local somefuc() local creature = SpawnPrefab("prefab"... doTaskIntime("creature",10) end how can i set the player only can invoke once during 10 sec? is there any time function i can use? Share this post Link to post Share on other sites
ZupaleX 270 Report post Posted September 19, 2015 You can make a use of GetTime() and store the last invoke time as well, so when the player try to invoke, it would perform a check like if GetTime() - lastinvoketime < 10 then returnelse DoYourStuffsend Share this post Link to post Share on other sites
Milllk 59 Report post Posted September 19, 2015 You can make a use of GetTime() and store the last invoke time as well, so when the player try to invoke, it would perform a check like if GetTime() - lastinvoketime < 10 then returnelse DoYourStuffsendthank you a lot ,ill try it out Share this post Link to post Share on other sites