I cant seem to get this code to work.
game.Players.Glassify.leaderstats.Rank.Value = Head Scripter
I am trying to make my rank on the leaderstats Head Scripter but it wont work the other code that interacts with this code is the following.
local playerStats = {} --this keeps a list of the stats for each player that enters the game game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "leaderstats" local grouprank = Instance.new("StringValue", leaderstats) grouprank.Name = "Rank" local rank = player:GetRoleInGroup() -- Insert the group ID for whatever group you want ranks displayed for here. if rank ~= 0 then grouprank.Value = rank else grouprank.Value = "Guest" end playerStats[player] = leaderstats end)
Since you are attempting to assign a value to a string value, you have to indicate it is a string, using "
or '
.
game.Players.Glassify.leaderstats.Rank.Value = "Head Scripter"
Uh,
game.Players.Glassify.leaderstats.Rank.Value = "Head Scripter"
You forgot to turn it into a string. Also, make sure that Glassify exists at the time you're running it.