The purpose of this script is to apply a BillBoard GUI to members of the Navy blue team. However, when I added this line of code;

if character.TeamColor == BrickColor.new("Navy blue") then

Then it stopped working. Here is the whole script, thanks so much for any help.

function Intialize(character)
			if character.TeamColor == BrickColor.new("Navy blue") then
			c = script.BillboardGui:Clone()
			c.Parent = character
wait(0.0001)
c.head.Disabled = false
		end

function Apply(obj)
	if obj.Name == "Humanoid" then
		Intialize(obj.Parent)
	end
	for i, child in pairs(obj:GetChildren()) do
		Apply(child)
	
	end
end

Apply(game.Workspace)
game.Workspace.ChildAdded:connect(Apply)

2 comments

0

If you're referring the player's character then that's your issue. The "TeamColor" property is in the Player. What is output saying? I can get a better idea of the issue if you post that as well.

0

You can use the :GetPlayerFromCharacter() method to get the player to check the team color. Also, the standard minimum wait time is about 0.03 seconds, so you might as well replace your wait(0.0001) with wait().