Reputation: 13
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)
Upvotes: 0
Views: 806
Reputation: 1
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!
Upvotes: 0
Reputation: 11
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.
Upvotes: 1