Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

Help how would I turn my hair into yellow once the certain tool was equipped?

Asked by 9 years ago

--I tried BrickColoring my hair but it didn't seem quite to work out well I tried to turn my hair into yellow.But it would error what I'm trying to say is that whenever the tool is equipped and done my hair turns yellow. Therefore removing the tool after I have equipped it and it has given me my hair to turn into yellow.

function Selected()
Instance.new("Tool",game.Players.legomaster38.Backpack).Name = "SSJ"
game.Workspace.legomaster38["Ultra-Fabulous Hair"].BrickColor=BrickColor.new("New Yeller")
end
game.Players.legomaster38.Backpack.Tool.Equipped:connect(Selected)

1 answer

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

Hair, which is actually a hat instance, cannot directly be re-colored.

Hair's color comes from the mesh that is inside the Handle of the hat instance, there is a property in that mesh called TextureId. The Texture of the mesh determines the colors / design of the mesh.

To re-color hats, you need to change the texture of the mesh inside of the handle of the hat

Example;

function Selected()
Instance.new("Tool",game.Players.legomaster38.Backpack).Name = "SSJ"
local hat = workspace.legomaster38["Ultra-Fabulous Hair"]
hat.Handle.Mesh.TextureId = "" --Place your texture here
end

game.Players.legomaster38.Backpack.Tool.Equipped:connect(Selected)
0
Thank you! legomaster38 39 — 9y
Ad

Answer this question