Leaderstats not showing

  1. What do you want to achieve?
    I would like to show the leaderstats and see if it actually works. I am quite new to making leaderstats and saving data on Roblox.
  2. What is the issue?
    The leaderstats doesn’t show up. There are no errors in the Output log. This is also a Script, not a LocalScript.
  3. What solutions have you tried so far?
    Rephrasing the lines of code and searching on the devforum, all to no avail.
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local cash = Instance.new("IntValue")
	cash.Parent = leaderstats
	cash.Name = "Cash"
	cash.Value = 0
end)

I think it might be something on my end, because this exact code might work for other people.

It works for me.
image

Which is why I assumed that this was an issue on my end. Is it because of Team Create?

where is this script located at?

ServerScriptService, which is where I assume it should be…

try opening the drafts tab and committing the script changes if its in team create

I don’t have a drafts tab in that location…
It just skips draft, and its just Terrain Editor and Chat

when you test play. can you see the leaderstats folder in your player in the Explorer?

Yes, the leaderstats folder is in my player. I tried running a published version of it on roblox, and it still doesn’t show up. I think it might be my client. Also, I have pressed the Tab button on my keyboard to reveal the leaderboard, but that doesn’t work either.

Have you tried using the same script in a newly created place? It could be some scripts overlapping or some localscripts disabling the coregui itself.

1 Like

Aha! I found the issue. I have a loading screen (that I hid previously) which has a script that disables the coregui.

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)

So, if I say

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)

after the loading finishes, it should work, right?

1 Like

Yes!, That’s the culprit all along. :smile:

1 Like