To make it short, i have a script that does damage at some point, Let's say in the tool i have a IntValue with a value of 5 called Bob
Bob=script.Parent.Bob.Value
in the script, the damage value is
Dmg = 0.5*Bob
So the problem is, It does calculate 0.5*5 , But if the value changes, it will still calculate the base value of Bob and not the new value. How can i make the script check what the value is more than one time?
Thanks already anyone willing to help.

16 comments
Yep ^
That helps , But would there be a way to loop that very part within the script? The IntValue's Value can change at anytime during various circumstances, as far as i can tell, what you just posted, would check once after 2 seconds.
Wait, what do you mean by that? Dmg is only a variable. Do you have another IntValue called Dmg? Or are you using that Dmg variable somewhere else in the same Script?
The Dmg Variable calculated in the script is used later in the same script to define the ammount of damage dealt along with the rest of the code.
I update my code to fit your needs.
If that helps, a fix i have tought about was to make the Calculation a "while true do" While it did work, the script would be stuck on the loop and not proceed on pretty much breaking the tool.
Try my edited code...
Hm, didn't seem to change anything, but. I hadn't read the binding event part. Mind telling me more about that? Sorry, I'm still learning this stuff.
Please post the code that you are using, so I can see what is wrong.
http://pastebin.com/8LBesbaJ Local script inside a tool.
On line 35 and 36, you are again using the variable instead of the actual value. Define 'SLASH_DAMAGE' and 'SPECIAL_DAMAGE' before the event. Then, in the event, change those too, when changing the BaseDmg.
Thanks alot! Got it perfectly working with your help. does this website have any credit system? so i can give you credit for solving the problem.
Click 'Accept Answer' next to my answer, on the right side. And upvote my answer if you liked it.
There doesn't seem to be an accept answer button. and i need a certain reputation to upvote,
I don't know why the accept answer doesn't show though. It makes it easier for people to see what is solved and what is not.
Actualy, It would appear that it works in studio testing, But in the actual game, when i tried to test it, it didn't seem to work.