✓ Accepted answer
I'm confused as to whether you are just trying to set your rank or everyone who joins. If you're just setting your rank then it'd be something like this:
local textLabel = script.Parent:WaitForChild('TextLabel')
local player = game.Players.LocalPlayer
textLabel.Text = player:GetRoleInGroup(919349)
If you're trying to set it for everything, (then you'd need to use ChildAdded as PlayerAdded doesn't work in LocalScripts) - edit. I guess PlayerAdded works in LocalScripts now. It'd be something like this, but with your script so that it doesn't change the same TextLabel, but makes a new one and sets it.
local textLabel = script.Parent:WaitForChild('TextLabel')
local function setText(player)
textLabel.Text = player:GetRoleInGroup(919349)
end
game.Players.PlayerAdded:connect(function(player)
setText(player)
end)
for i,v in pairs(game.Players:GetPlayers()) do
setText(v)
end
3 comments
You have to put the actual group id, not 0.
I know that, I changed it to zero for privacy purposes.
There are actually no errors in the output.