I have made a gui which consists of a textbox and a button, When the text is entered and button pressed it changed a value. I need this value to be updated in the leaderboard, But can't seem to have it change the leaderboard in game. The leaderboard is for a player rank in a certain group, And it works by inputting the group ID. Below is the code, Any help would be appreciated.
id = game.Workspace.tt.Value
game.Players.PlayerAdded:connect(function(D)
repeat wait() until D:findFirstChild("leaderstats")
local Rank = Instance.new("StringValue", D.leaderstats)
Rank.Name = "Raiders"
print (id)
Rank.Value = D:GetRoleInGroup(id)
end)

1 comment
The value is an intvalue, as it is a group ID