I've made a script that runs whenever a player respawns that checks for a particular value which is used to assign a variable and I'm wondering if it is at all possible to be able to tell the script that this value has been updated and to run through itself again to change said variable?
I've looked into using callbacks but I'm still not sure how exactly they work so an explanation on it too would be greatly appreciated.
maybye do this...
thevaraibleyouwannadetect = 1 doanothervariablelikethis = thevaraibleyouwannadetect while true do thevaraibleyouwannadetect = 2 if not thevaraibleyouwannadetect == doanothervariablelikethis then print("variable change detected!") doanothervariablelikethis = thevaraibleyouwannadetect end