Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] Stop a Stat from showing in the Player List?

Asked by 10 years ago

I made a script to add some Stats into my game, but I can't get it to work the way I want. I only want to display a Cash value, but my other value shows as well. Can someone help me?

Script

game.Players.PlayerAdded:connect(function(newPlayer)

    local Stats = Instance.new("Model", newPlayer)
    Stats.Name = "leaderstats"

    local Cash = Instance.new("IntValue", Stats)
    Cash.Name = "Cash"

    local isOwner = Instance.new("BoolValue", Stats)
    isOwner.Name = "isOwner"

end)

It displays like this, but I only want the Cash value to show up.

Cash = 0
isOwner = 0

1 answer

Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

The way Roblox is set up, anything inside 'leaderstats' will show on the leaderboard. Therefore just parent your objects directly inside the player.

Instance.new("BoolValue", newPlayer)
0
Thanks! TheArmoredReaper 173 — 10y
Ad

Answer this question