Custom PlayerList - Help

So currently I’m making my own custom Player List for my game. However, when the player’s value changes the Text will always display nil. Why is this happening ?

– Local Script

local function AddPlayerList(Player)
	
	local leaderstats = Player:WaitForChild("leaderstats") 
	local Kills = leaderstats.Kills.Value 
	local List = script.Parent.Frame.List:Clone()
	
	--// Setting Up the Players Frame
	List.Parent = script.Parent.Frame
	List.Name = Player.Name
	List.Visible = true
	List.PlayerName.Text = Player.Name
	List.PlayerKills.Text = tostring(Kills) 
	
	Player.leaderstats.Kills:GetPropertyChangedSignal("Value"):Connect(function(newValue)
		List.PlayerKills.Text = tostring(newValue)
	end)
end

– Player List
Custom Player List

1 Like
local function AddPlayerList(Player)
	
	local leaderstats = Player:WaitForChild("leaderstats") 
	local Kills = leaderstats.Kills.Value 
	local List = script.Parent.Frame.List:Clone()
	
	--// Setting Up the Players Frame
	List.Parent = script.Parent.Frame
	List.Name = Player.Name
	List.Visible = true
	List.PlayerName.Text = Player.Name
	List.PlayerKills.Text = tostring(Kills) 
	
	Player.leaderstats.Kills:GetPropertyChangedSignal("Value"):Connect(function()
		List.PlayerKills.Text = Player.leaderstats.Kills.Value
	end)
end

GetPropertyChangedSignal does not provide the ‘new value’ through the connected function’s parameter. In fact, it provides nothing at all from my testing. I guess it’s a little different from Changed in that regard.

1 Like