I am trying to make a name gui that gets applied based on your team, like if you on a team named "blue", that would go over your head with the assigned color. I've been trying to make this for a few days now and I am becoming very frustrated, can I have some help? This is my code so far:
local teams = game:GetService('Teams')
game.Workspace.ChildAdded:Connect(function(name)
if game.Players:FindFirstChild(name.Name) == nil then return end
local GUI = game.ReplicatedStorage.NameGUI:Clone()
GUI.NameLabel.Text = " ".. teams.name .." "
GUI.Parent = name.Head
end)
also note: I am new to scripting

5 comments
I tried that but nothing happened, and I don't know why, everything seems to line up.
check in the output and see if there's any errors
where would I check that? Again Im relativity new to scripting and dont know a lot about it.
wait never mind, I found it and there was an error, and I fixed it but the script is still not working
do you have team objects in the Team service? with AutoAssignable set to true?