I used to be a good scripter until 2013. Things got advanced and I lost some of my scripting knowledge. I'm making a light switch and I don't know how to call the Material and Color3 of the brick. Help? The script currently is
light = true local lights = script.Parent.Parent.Model:GetChildren() function onClicked() if light == true then lights. end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Thanks
It would simply be:
lights.Material
or
lights.BrickColor
The material has to be a material enum data type and the BrickColor has to be a BrickColor value.
Example:
lights.Material = Enum.Material.Neon
or
lights.Material = "Neon"
For the BrickColor, the new color must be set as a BrickColor value like so:
lights.BrickColor = BrickColor.new("Really red")