I am trying to make a machine to where if the tool Colors are equal to what the script says it will change the name... but it wont work for some reason? I have tried different ways but none have been helping me....
What will happen is when the handle touches it if Filling one and Filling two are equal to the Color in the Script then it will change the tool name
h is the tool handle Filling One And Filling Two Are Not Children Of The Tool
function tch(h) if h.Name == "Handle" and h.Parent.FillingOne.BrickColor == "Nougat" and h.Parent.FillingTwo.BrickColor == "Reddish brown" then script.Parent.Sound:play() wait(2.5) script.Parent.Sound:Stop() h.Parent.Name = "Butterfinger Blizzard" end end script.Parent.Touched:connect(tch)
When I go to do it In the output it now pops up,
"10:02:09.097 - FillingOne is not a valid member of Part"
Can someone help me?
function tch(hit) if hit and hit.Name == "Handle" then if hit.Parent:IsA("Tool") and hit.Parent:findFirstChild("FillingOne") and hit.Parent:findFirstChild("FillingTwo") then local filling = hit.Parent.FillingOne local filling2 = hit.Parent.FillingTwo if filling.BrickColor == BrickColor.new("Nougat") and filling2.BrickColor == BrickColor.new("Reddish brown") then script.Parent.Sound:play() wait(2.5) script.Parent.Sound:Stop() h.Parent.Name = "Butterfinger Blizzard" end end end end script.Parent.Touched:connect(tch)
I edited ImageLabel's script to work. I explained all of this to you in the chat.