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.
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.
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.
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.