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

:GetPropertyChangedSignal() Not detecting Change in Value?

Asked by 4 years ago
Edited 4 years ago

Im having this weird issue. Basically when the PlayerCount goes up when you enter a lobby and I have a script here to start a timer if the playercount > 3 but the script never detects the GetPropertyChangesSignal().

01script.Parent.Parent.Players:GetPropertyChangedSignal("Value"):Connect(function()
02    if script.Parent.Players.Value >= 3 then
03        if script.Parent.Value == 0 then
04            script.Parent.Value = 30
05        end
06    end
07    if script.Parent.Players.Value < 3 then
08        script.Parent.Value = 0
09    end
10end)

Same with the other script I have that does the timer.

1script.Parent:GetPropertyChangedSignal("Value"):Connect(function()
2    if script.Parent.Value ~= 0 then
3        wait(1)
4        script.Parent.Value = script.Parent.Value - 1
5    end
6end)

I also tested printing right after the value change was detected and it would never print anything for both scripts.

The weird this is that in the PlayerGUI scripts it detects them just fine

Answer this question