So this script is supposed to change the color of the new head part to your current head's color. However, it is not working, and I have no idea why, as output was not of much use. Can someone please help me?
Here's the script:
function spn(NewP)
wait()
local mesh = NewP.Character.Head:findFirstChild("Mesh")
local Part = Instance.new("Part")
Part.BrickColor = NewP.Character("Body Colors").HeadColor ----The script worked fine until I added this line
-----rest of code
end

4 comments
Use brackets rather than parentheses (use [] instead of () to hold Body Colors).
Still doesn't work, but output gave me this: "Body Colors is not a valid member of Model"
Trying using a repeat wait() until NewP.Character:FindFirstChild("Body Colors"), chances are, Body Colors may not be spawning quick enough.
I fixed it. Thanks for the help!