.Changed and :GetPropertyChangedSignal() not firing on intvalue

So I have a simple issue that I have never had happen before so, I would wonder how to fix it.

I have looked but the fixes I have found don’t help with what I am trying to do.

Script: (Note its a localscript)

local gui = script.Parent
local lead = gui.lead
local lastplrs = 0
local function addplr(plr)
	if plr and not lead:FindFirstChild(game.ReplicatedStorage.Plrs.Last.Value) then
		local image = gui.Base:Clone()
		local content,epic = game.Players:GetUserThumbnailAsync(game.Players:GetUserIdFromNameAsync(plr), Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size420x420)
		image.Image = content
		image.Size = UDim2.new(0, 420, 0, 420)
		image.Parent = lead
		image.Visible = true
		image.Name = plr
	end
end
local function removeplr(plr)
	if plr and lead:FindFirstChild(game.ReplicatedStorage.Plrs.Last.Value) then
		lead[game.ReplicatedStorage.Plrs.Last.Value]:Destroy()
	end
end
game.ReplicatedStorage.Plrs:GetPropertyChangedSignal("Value"):Connect(function()
	if game.ReplicatedStorage.Plrs.Value > lastplrs then
		addplr(game.ReplicatedStorage.Plrs.Last.Value)
	elseif game.ReplicatedStorage.Plrs.Value < lastplrs then
		removeplr(game.ReplicatedStorage.Plrs.Last.Value)
	end
	lastplrs = game.ReplicatedStorage.Plrs.Value
end)
1 Like

You don’t seem to even be setting the value in the first place.

1 Like

I think this is a bug related to Roblox. There is nothing wrong with your script. I tested it and it seems that the property changed event does not fire when the server starts, but when you later increment the Plrs value from the server it seems to work just fine.

1 Like

Values have a modified .Changed event that only fires when Value is changed and the Argument passed in is the new value instead of the property

1 Like

Do you happen to know any fixes?

1 Like