Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Group rank and name gui doesnt work. ???

--[[

The following is a group rank script in Server Script Service. In this script I have a BilboardGui. In that Bilboard Gui I have 2 text buttons. One for name and the other for rank.
I don't know why the following doesn't work. 

]]

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local Gui = script.BillboardGui:Clone()
		Gui.Parent = Character:FindFirstChild("Head")
		Gui.RankGui.Text = Player:GetRoleInGroup(6263230)
		Gui.NameGui.Text = Player.Name -- Problem Here, Says Attempt To Index String With Text
	end)
end)

1 answer

✓ Accepted answer

You have to rename your text label. When you do Gui.Name you are actually getting the property of Gui and it's returning a string, the name. You could always use FindFirstChild, but I definitely don't recommend that.

4 comments

0

Oh yeah thats an error too but not the main problem. The main problem is that Player.Name isnt working.

0

The error you described is only a result of the problem I said. I see you edited it and changed it, if you test it again it should work perfectly fine. If not tell me what line and the error.

0

Oof.

0

Well thx.

This discussion is preserved as it was. New answers, comments, and votes are closed.