My goal is when i touch a button, the Model turns teal/ Bright bluish green. But when i touch the button, the model in my game called Base1 does not turn teal, none of it does.
function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then game.Workspace.Base1:GetChildren().Color = Color3.new(0,200,175) end end script.Parent.Touched:connect(onTouch)
`function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then for k,v in pairs(workspace.Base1:GetChildren()) do --This loops in the Base1 if v.ClassName == "Part" then --Checks if it is a part v.Color3 = Color3.new(0,200,175) --Then it changes the color in to that. end end end end
script.Parent.Touched:connect(onTouch) `
You cant change the color of Humanoids. You have to change the color of a "Brick". You have to give the script an object to color. Not the name.