Are the leaderstats meant to appear 100 in Studio?

I was working on a Cash System until I stumbled upon the Value’s incorrection.
I have tried to research solutions for the matter but there is none that I could search for.

image

game.Players.PlayerAdded:Connect(function(Player)
	local CashValue = Instance.new("IntValue")
	CashValue.Name = "Cash"
	CashValue.Parent = Player
	CashValue.Value = 0
end)
5 Likes

In your code, you parent the cash IntValue to the player and not to a leaderstats folder, which won’t make your value be displayed on the leaderboard.

It is likely that the cash value shown in the screenshot is created by another script in your game.

Try this

local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Player)
    local leaderstats = Instance.new("Folder", Player)
    leaderstats.Name = "leaderstats"
	local CashValue = Instance.new("IntValue", leaderstats)
	CashValue.Name = "Cash"
	CashValue.Value = 0
end)

I can assure you that it’s not another script as this is the only one in the entire game.

1 Like

Oh wait nvm lol, it was the saving system that confused my mushed brain.

2 Likes

I still think you should use that because your script above is not really exactly a leaderstats

2 Likes