Alright so i am trying to use true colors on parts, you know the part property color that has [255, 22, 1] and not the name of the color.
However i just tried looking online and couldnt find an answer to this. Ive used Brickcolor and Color3. Brickcolor only works when you type the name of the color and Color3 isnt a property of parts. So how could i the true colors and not the names on the parts?
My idea is to made a gradient strobe light that dims in and out but i want to use the color property along with the light.
The issue with this is that Color3 doesnt identify as a property to parts or is it that im doing something wrong here? Its a pretty basic script but im gonna do more once i figure out the correct color function
local ClickDetector =script.Parent local Switch = ClickDetector.Parent.Parent local Burner = Switch.Burner function LightOn() if Burner.Color3 == Color3.fromRGB()("88, 88, 88") then Burner.Color3 = Color3.fromRGB()("255, 0, 0") else Burner.Color3 = Color3.fromRGB()("88, 88, 88") end end ClickDetector.MouseClick:connect(LightOn)
If you look a little closer at the Properties, you'll notice that that specific property is just Color
, not Color3
. Additionally, you're not creating the Color3 values correctly, as XAXA pointed out:
local ClickDetector =script.Parent local Switch = ClickDetector.Parent.Parent local Burner = Switch.Burner local toggle = false function LightOn() toggle = not toggle if toggle then Burner.Color = Color3.fromRGB("255, 0, 0") else Burner.Color = Color3.fromRGB("88, 88, 88") end end ClickDetector.MouseClick:connect(LightOn)