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

How do I run a function everytime a value is changed?

Asked by 7 years ago

I've tried doing this in a few different ways but I apparently didn't do something right.

0
What kind of "value"? Provide more context? BlueTaslem 18071 — 7y
1
Remember to give as much information as possible when asking questions or we can't give you the best possible answer. NewVoids 97 — 7y
View all comments (4 more)
1
The value of what? An instance (NumberValue, StringValue, etc.), a variable? Sir_Melio 221 — 7y
0
.Changed.... Meltdown81 309 — 7y
0
To vague. Jexpler 63 — 7y
0
Instance.Changed event fires every time a property of 'Instance' changes. RubenKan 3615 — 7y

1 answer

Log in to vote
0
Answered by
Filipalla 504 Moderation Voter
7 years ago
Edited 7 years ago

there you go

the function changed do is that it check if something was changed in your object in this case the value object

value.changed:connect(function()

end

Changed

For better help provide more information!

//Filipalla

`

0
value.changed:connect(function(), Changed should be capitalized first char, :connect() is deprecated, use :Connect() instead RubenKan 3615 — 7y
0
i did not even know that why even only make it deprecated for changing to uppercase change it's anoying it still works but roblox can remove it at any time! Filipalla 504 — 7y
Ad

Answer this question