so basically, this is a script that Adds Leader Stats, its a normal script inside of workspace. but only ONE of the Leader Stats show up, any help please?
game.Players.PlayerAdded:connect(function(plr) local stats = Instance.new("IntValue", plr) stats.Name = "leaderstats" local lev = Instance.new("IntValue", stats) lev.Name = "Star Shards" lev.Value = 0 local lev = Instance.new("IntValue", stats) lev.Name = "Star Coins" lev.Value = 0 end)
The issue was caused due to the fact you had 2 local variables that were named "lev" this is fixed by changing the name of the second variable to just about anything else. It just happened to be lev2 in this example.
game.Players.PlayerAdded:connect(function(plr) local stats = Instance.new("IntValue", plr) stats.Name = "leaderstats" local lev = Instance.new("IntValue", stats) lev.Name = "Star Shards" lev.Value = 0 local lev2 = Instance.new("IntValue", stats) lev2.Name = "Star Coins" lev2.Value = 0 end)