Hello, I'm trying to make the intValue of leaderstats. Money appear in the player's GUI. However, it gives an error: Money is not a valid member of Folder "Players.Verbo_Pro.leaderstats".
The script is located in the TextLabel
local moneyText = script.Parent
while true do
wait(1)
local stats = game.Players.LocalPlayer.leaderstats
print(stats.Money)
moneyText.Text = "Money: "
end
The script is located in ServerScriptService
local function onPlayerAdd(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local money = Instance.new("IntValue")
money.Name = "Money "
money.Value = 0
money.Parent = stats
end
game.Players.PlayerAdded:Connect(onPlayerAdd)
If I change line 7 in the first script to:
print(stats)
Then output gives the name and no errors. I hope for your help. Thank you in advance!

3 comments
Very well explained! I'm impressed.
Thank you very much! You're the best!!! Who would have thought that the problem was in this gap, and I didn't even notice!!! Thanks!!!!
Heh, you're welcome.