I am making a game with Stars and Coins. I tried to duplicate one of the scripts to make it say Coins instead of Stars but it gives me 0 for Coins, and then Stars doesn't even show up. Someone please help me. This is the script I duplicated used. It is from the roblox wiki.
game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model") leaderstats.Name = "leaderstats" leaderstats.Parent = player local money = Instance.new("IntValue") --We create a new IntValue money.Name = "Stars" --this is the name you want the leader-stat to be when it shows up in-game. money.Value = 0 --this is the value of money the new player starts out with. To change this, you can add some more code (shown later) money.Parent = leaderstats -- Set the money object as a child of the leaderstats object. end)
something like this:
game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model") leaderstats.Name = "leaderstats" leaderstats.Parent = player local money = Instance.new("IntValue") money.Name = "Stars" money.Value = 0 money.Parent = leaderstats local cash = Instance.new("IntValue") cash.Name = "Anything" cash.Value = 0 cash.Parent = leaderstats end)