Salutations, I am trying to have two leaderstats. One with the player's rank, and one with a player's points for the training.
Only the Rank shows up.
This is my current script:
game.Players.PlayerAdded:connect(function(plr) local leaderstats = plr:WaitForChild("leaderstats") local Rank = Instance.new("IntValue",leaderstats) Rank.name = "Rank" Rank.value = plr:GetRoleInGroup(4853203) local Points = Instance.new("IntValue",leaderstats) Points.name = "Points" Points.Value = 0 end)
Your problem is on line 4, IntValues are number values, not strings.
To fix this, on line 4, change "IntValue" to "StringValue", like so.
local Rank = Instance.new("StringValue",leaderstats)
Final Script
game.Players.PlayerAdded:connect(function(plr) local leaderstats = Instance.new("Folder",plr) leaderstats.Name = "leaderstats" local Rank = Instance.new("StringValue",leaderstats) Rank.Name = "Rank" Rank.Value = plr:GetRoleInGroup(4853203) local Points = Instance.new("IntValue",leaderstats) Points.Name = "Points" Points.Value = 0 end)
Hope this helped!