the console wont tell me any errors when i run this, but literally nothing happens when i click with this code. i did have code earlier that changed E.Material = "SmoothPlastic"
to E.Material = "Smooth Plastic"
and it said "Smooth Plastic" isnt a type of material, but the colors changed. now the colors arent changing at all, and like i said, i am getting no errors at all. heres my code and model layout:
local ClickDetector = script.Parent.ClickDetector local E = script.Parent.Parent["Sign Letters"].E local I = script.Parent.Parent["Sign Letters"].I local Light_Bar = script.Parent.Parent["Light Bar"] local State = true; local T = script.Parent.Parent["Sign Letters"].T local X = script.Parent.Parent["Sign Letters"].X function Clicked() if State == true then E.BrickColor = BrickColor.new(179) E.Material = "SmoothPlastic" I.BrickColor = BrickColor.new(179) I.Material = "SmoothPlastic" Light_Bar.BrickColor = BrickColor.new(179) Light_Bar.Material = "SmoothPlastic" State = false T.BrickColor = BrickColor.new(179) T.Material = "SmoothPlastic" X.BrickColor = BrickColor.new(179) X.Material = "SmoothPlastic" end if State == false then E.BrickColor = BrickColor.new(1004) E.Material = "Neon" I.BrickColor = BrickColor.new(1004) I.Material = "Neon" Light_Bar.BrickColor = BrickColor.new(1004) Light_Bar.Material = "Neon" State = true T.BrickColor = BrickColor.new(1004) T.Material = "Neon" X.BrickColor = BrickColor.new(1004) X.Material = "Neon" end end ClickDetector.MouseClick:Connect(Clicked)
https://tewms-of-sewvice.discowd.com/RobloxStudioBeta_bCsz8JV6kn.png