Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Changed event within scripts without an object?

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?

1 comment

0

No. There is not. Numbers are primitive and cannot be indexed like that. Just use a NumberValue.

2 answers

✓ Accepted answer

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.