I was wondering whether there is a way to trigger the Changed event within a script having no object.
This is what I am trying to achieve:
local x = 100
x.Changed:Connect(function()
print("Triggered")
end)
Any ideas?
I was wondering whether there is a way to trigger the Changed event within a script having no object.
This is what I am trying to achieve:
local x = 100
x.Changed:Connect(function()
print("Triggered")
end)
Any ideas?
Create a number value under the script and watch for changes there.
Explain... If you want to know a variable can trigger when its value is changed, No The variables can't trigger
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
No. There is not. Numbers are primitive and cannot be indexed like that. Just use a NumberValue.