Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

:GetPropertyChangedSignal() Not detecting Change in Value?

Asked by 20 days ago
Edited 19 days 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().

script.Parent.Parent.Players:GetPropertyChangedSignal("Value"):Connect(function()
    if script.Parent.Players.Value >= 3 then
        if script.Parent.Value == 0 then
            script.Parent.Value = 30
        end
    end
    if script.Parent.Players.Value < 3 then
        script.Parent.Value = 0
    end
end)

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

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

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