Leaderboard Template not working

I’m making a custom leaderboard ui and I got all the scripting done but the username/kills/death display does not show.

In studio

While playing


local scoreboard = script.Parent
local main = scoreboard.BG
local holder = main.StatsHold
local temp = holder.Template
temp.Parent = script

local UIS = game:GetService("UserInputService")

local function clear()
	for i,v in pairs(holder:GetChildren()) do
		if v:IsA("Frame") then

local function generate()

	for i,player in pairs(game.Players:GetPlayers()) do

		local PS = player:FindFirstChild("PlayerStats")
		local kills = PS.kills
		local deaths = PS.deaths

		local c = temp:Clone()
		c.user.Text = player.Name
		c.kills.Text = kills.Value
		c.deaths.Text = deaths.Value
		c.Parent = holder


----Edit "Tab" to custom keybind----

UIS.InputBegan:Connect(function(input, k)
	if input.KeyCode == Enum.KeyCode.Tab then
		scoreboard.Enabled = true

UIS.InputEnded:Connect(function(input, k)
	if input.KeyCode == Enum.KeyCode.Tab then

		scoreboard.Enabled = false


I don’t think it was a code problem because i deleted everything except the keycode and it still didn’t show. If any more screenshots are needed I can provide them for you.

Edit: I deleted temp.Parent = script and it showed but now the stats changer doesn’t work.

add ui list layout to holder

this will create a basic list

I already have it. It was the temp.Parent = script that was the problem. Now yhe problem is that the values dont show

1 Like

It would be helpful to resolve your issue if you are able to provide the detailed description of the exact issue you are facing right now

1 Like

Oh I thought it was clear but I guess not. The leadboard ui was broken because of a piece of script but ever since I fixed that, the template of the leaderboard won’t change and the values won’t be shown either.