My text color just doesn't want to change

I have an overheadgui that would change color once you type a certain command like !red for example, however when they do type it, it doesn’t want to change.

local Players = game:GetService("Players")

local redcommand = "!red"

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(character)
	plr.Chatted:Connect(function(msg)
			if msg == redcommand then
				print("Red command was used")
				character.HumanoidRootPart:WaitForChild("BillBoardGui").Name.TextColor3 = Color3.new(1, 0, 0)
			end
	    end)
	end)
end)

This is a server script, and yeah, the “Red Command was used” does print. I know It’s finding my character as I looped through all It’s children just to make sure. Any help would be appreciated! (:

The issue is you are using .Name after waiting for billboard GUI, also the classname of BillboardGui is BillboardGui, you capitalised the second B as well, unless you have renamed it to that.

The script thinks you are trying to access the name property of the BillboardGui, if you have a child of a Instance never name it ‘Name’ or you will most likely encounter issues.

1 Like

Ah, I see. It works now! Thanks, yeah I totally disregarded the fact that renaming something to name might cause issues.

1 Like

No problem, good luck making your game!