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.
1 | function onTouch(part) |
2 | local humanoid = part.Parent:FindFirstChild( "Humanoid" ) |
3 | if (humanoid ~ = nil ) then |
4 | game.Workspace.Base 1 :GetChildren().Color = Color 3. new( 0 , 200 , 175 ) |
5 | end |
6 | end |
7 |
8 | 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.