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

intvalue cant be detected with a script?

Asked by
Catr899 12
3 years ago

This doesn't make sense, I've spend hours messing with the script and nothing seems to work.

0
script : script.Parent.Value.Changed:Connect(function() if script.Parent.Value == 4 then print("lall") end end) Catr899 12 — 3y

2 answers

Log in to vote
0
Answered by
Catr899 12
3 years ago
Edited 3 years ago

https://cdn.discordapp.com/attachments/475488233107750913/841854519934976010/unknown.png

Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

try:

script.Parent.Changed:Connect(function()
end)

or

script.Parent:GetPropertyChangedSignal("Value"):Connect(function()
end)

Value is a property of the IntValue object, rather than the object itself

0
the script is a child of an intvalue, how would i try to get the value of the intvalue if the intvalue changes? Catr899 12 — 3y
0
I think both would work but I'm on a phone right now so I can't test it OfficerBrah 494 — 3y
0
should i use a local script? i tried printing something in the function but nothing worked Catr899 12 — 3y
0
If you're modifying the value in a local script, then yes, because things done in a localscript do not replicate from the client to the server OfficerBrah 494 — 3y

Answer this question