Hello! I´m trying to make text change if players have rank 6+ in group (Group ID: 5104718) text in GUI will change, however this script doesnt work for some reason (no errors)
Script
game.Players.PlayerAdded:Connect(function(Player)
if Player:GetRankInGroup(5104718) >= 6 then
script.Parent.TextLabel.Text = "RoO 2.0"
script.Parent.ImageColor3 = Color3.fromRGB(255, 255, 255)
end
end)
If this is a localscript:
The player is created before the localscript, hence: your PlayerAdded event won’t run.
If this is a serverscript:
Use a localscript to deal with UI-related things, the server is not meant to do such things.
I would recommend using a RemoteEvent and use the method FireClient().
–
Also, the rank is cached on the server-side (in case you did not know).
You could always look into GroupService though,
to avoid this type of caching-behavior on GetRankInGroup().