Changing hair color via a server script?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    Currently, I’d like a server script that changes the character’s hair color to yellow. I figured you could look for the child “HairAttachment”, then with that, I could use the HairAttachment’s parent and change the part’s color.

  2. What is the issue?
    I’m not exactly sure how I’d set up finding the HairAttachment in the Character. That’s all I need.

  3. What solutions have you tried so far?
    I’ve thought about trying find first child HairAttachment but I think that’d be wrong? I just need to know how I’d go about FINDING HairAttachment. Then I’d have something to work with.

Maybe you can try doing:

for i,v in pairs(character:GetDescendants()) do
	if v.Name == "HairAttachment" then
		-- do stuff
	end
end

(I’m not sure if it’s actually called HairAttatchment or not I’ve never used it)

You could use FindFirstDescendant or a recursive FindFirstChild (I think?)

Player.Character:FindFirstDescendant("HairAttatchment")

Player.Character:FindFirstChild("HairAttatchment", true)

An iteration could work, as @DudeW0rld said.

for i, v in next, Player.Character:GetDescendants(), nil do
    if v.Name == "HairAttatchment" then
        --yay it was found
        break
    end
end