That would make literally no difference at all.
Then what about trying:
RankUiClone.Frame.TextLabel.Text = plr:GetRoleInGroup(959294)
UsernameUiClone.Frame.TextLabel.Text = plr.Name
Like BanTech suggested? Unless you already have. There should be nothing wrong though.
Try run the script in a separate studio window, to see if there is nothing in the game interfering.
--- // VARIABLES // ---
local ServerStorageService = game:GetService('ServerStorage')
local RankUi = ServerStorageService:WaitForChild('RankGui')
local UsernameUi = ServerStorageService:WaitForChild('UsernameGui')
--- // MAIN CODE // ---
game.Players.PlayerAdded:Connect(function(plr)
repeat wait until plr.Character
local RankUiClone = RankUi:Clone()
local UsernameUiClone = UsernameUi:Clone()
local Head = plr.Character:WaitForChild("Head")
RankUiClone.Parent = Head
UsernameUiClone.Parent = Head
RankUiClone.Frame:FindFirstChild('TextLabel').Text = plr:GetRoleInGroup(959294)
UsernameUiClone.Frame:FindFirstChild('TextLabel').Text = plr.Name
end)
just hope this works
That would not make sense, since it would only run once.
I get this error now:
13:32:19.024 - TextLabel is not a valid member of Frame
Also, still no textlabel.
the problem is that char the parameter doesnt exist so if you want the character then simply use plr.Character
No… using plr.CharacterAdded
automatically lets you use the first parameter as the player’s character, and runs everytime the player respawns…
What? I adressed the character as ‘char’ in:
plr.CharacterAdded:Connect(function(char)
print its class name then
30char
That does not even make sense…?
if the character exists then also would be the gui
It would print ‘Model’ as the player’s character is a model.
The problem was the TextLabel
not appearing in the GUI, not the character not appearing. Also your method would in fact not only not help, but it would be worse. Since the code would only run once. Sorry.
Also also, it printed “Model” as you can see here:
As the player’s charcter is a model:
can u show your surface gui’s with the textlabel in server storage
They are also most likely BillboardGuis btw.
And he already did, please read the thread above.
It’s a billboard gui… and sure.
I did test your script in studio now, I gets no errors and it loaded, I think something is interfering the script.
Try it in a clean workspace and test it there.