Custom Playerlist issues

Hello everyone,
I am here because of an issue in my game with the UI.
Basically, I am creating a custom playerlist, but sometimes it works and sometimes it doesn’t.
The main issues I have come across are:

  1. Player name not registering onto playerlist, therefore the template doesn’t clone
  2. Templates on the playerlist clip into each other.
  3. Player name doesn’t wan’t to remove.

If you want to see for yourself, the game is below here:

And I will supply code below:

--main script
--for playerlist
--nsg
--credit me
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
local ownerId=game:GetService("Players"):GetPlayerByUserId(158190828)
local m = require(script.ModuleScript)

game.Players.PlayerAdded:Connect(m.updatePlayers)
game.Players.PlayerRemoving:Connect(function()script.Parent.Template:Destroy()end)
m.updatePlayers()
--module
local m = {}
function m.updatePlayers()
	for i,v in pairs(game.Players:GetChildren()) do
		local t = script.Parent.Parent.Template:Clone()
		t.Parent = script.Parent.Parent.PlayerListMaster.PlayerScrollList
		t.NameFrame.OverlayFrame.PlayerName.PlayerName.Text = v.Name
		t.Visible = true
		if v.UserId == 158190828 then --this works btw
			t.NameFrame.OverlayFrame.PlayerIcon.Image="rbxasset://textures/ui/playerlist/PremiumIcon@3x.png"
		end
	end
end
return m

If you have anyway that could help, please don’t refrain from replying or opening a PM with me, thanks.

Are you using Listlayout for that? If not then I would highly recommend that.

image
Yes, I have a ListLayout