0
votes

So I have tried many variations of leaderstats scripts. Here is one in which should work just fine to my knowledge..... any thoughts on this? leaderstats gui will not display, but the script functions as I can tell through playing the game in studio to test and i notice under player it creates the folder and int value etc.

function showLeaderstats(player)
    
    local leaderstats = Instance.new("Folder",player)
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player
    
    local Cash = Instance.new("IntValue",leaderstats)
    Cash.Name = "Cash"
    Cash.Parent = leaderstats
    
    
    
end

game.Players.PlayerAdded:Connect(showLeaderstats)
2

2 Answers

0
votes

It works fine for me. Make sure the leaderboard isn't minimized, the code is in a script and not a local script, the script is in ServerScriptService or the workspace.

0
votes

Hey sorry to see that no one responded. You should try: instead of a folder do this:

local leaderstats = Instance.new("IntValue")
--after that, you can assign it's parent to:
leaderstats.Parent = stats

Let me know if this worked!