Custom Player List Not Working

I’ve got an admin panel that I’m trying to add a player list to. But for some reason, it doesn’t work. Local script is shown below. All help is appreciated!

local template = game.ReplicatedStorage.AdminPanel.Template

function updatePlayers()
	for i, child in pairs(script.Parent.Holder:GetChildren()) do
		if child:IsA("TextButton") then child:Destroy() end
	end
	
	for i, plr in pairs(game.Players:GetPlayers()) do
		local templateClone = template:Clone()
		templateClone.Text = plr.Name
	end
end

updatePlayers()
game.Players.PlayerAdded:Connect(updatePlayers)
game.Players.PlayerRemoving:Connect(updatePlayers)
1 Like

You did not parent the templateClone.

templateClone.Parent = script.Parent.Holder
1 Like

Ah yes, I’m an idiot. Thank you.