|
| 29 Mar 2014 06:10 PM |
Can you easily detect if a variable is changed? Like detecting if the following is changed.
local qnumber = 1 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 29 Mar 2014 06:14 PM |
| But it's possible. Might I ask why? |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:42 PM |
eh, just wanted to see if I could do something with a health gui. If you loose health, screen flashes red, gain, it flashes green. I was thinking of something like
function onupdate(oldvalue) while wait() do return newvalue end end
onupdate(12)
of course, it would be much more advanced than that. I was just wondering if there was an easier way. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:43 PM |
| You could use the Changed method if it's an object. But not for variables. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:48 PM |
You can use metatables if you're willing to go that far.
http://www.lua.org/pil/13.4.4.html |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:57 PM |
| I believe that roblox does support metatables. Am I wrong. I dont really care, it was just a concept in my head. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:58 PM |
*I don't believe*
game.Workspace.Missile.MainPart.BodyPosition.position = game.Forum.FloodCheckV2.9.Location.p |
|
|
| Report Abuse |
|
|