So I have a script that inserts a fakehead into the character and changes the character's head transparency to 0. Whenever I do fakehead.BrickColor = character.Head.BrickColor it would not work.
Script:
--Starting insertation.. game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local gui = game.ServerStorage:WaitForChild('NameGui') local humanoid = character:WaitForChild('Humanoid') local head = character:WaitForChild('Head') local teamcolor = player.TeamColor if gui and humanoid and head ~= nil then local copiedhead = head:Clone() copiedhead.Name = 'CopiedHead' copiedhead.Parent = character head.Transparency = 1 copiedhead.Transparency = 0 local copiedgui = gui:Clone() local weld = Instance.new('Weld') weld.Parent = copiedhead weld.Part0 = copiedhead weld.Part1 = head copiedgui.Name = 'NameGui' copiedgui.Parent = copiedhead end end) end)
fakehead.BrickColor = character.Head.BrickColor
Will not work, I believe it is because you are trying to assign userdata to BrickColor. You should instead use BrickColor.new(color)
to assign it.
Like so: fakehead.BrickColor = BrickColor.new(character.Head.BrickColor)
Well, assuming fakehead does not even exist as a variable in the script, I would suggest using the following line of code in your script:
copiedhead.BrickColor = character.Head.BrickColor
This should work. If not, put down a comment.