Working with some lighting for a friends game but I have continued to fail to have my lights match their brick color. The brick color pattern is there below. I tried to change it so the lights color would have the same pattern. Of course it didn't work ,_,
while true do wait(0.5) script.Parent.Color = BrickColor.new("Bright red") wait(0.5) script.Parent.Color = BrickColor.new("Bright orange") wait(0.5) script.Parent.Color = BrickColor.new("Bright yellow") wait(0.5) script.Parent.Color = BrickColor.new("Bright green") wait(0.5) script.Parent.Color = BrickColor.new("Bright blue") wait(0.5) script.Parent.Color = BrickColor.new("Bright violet") end
Hello, honoroll123!
You can use this script:
while wait(.1) do script.Parent.Color = script.Parent.Parent.Color -- sets light color to it's parent's color end
don't forget to make the script a child of the light =D
Good Luck with your games!!
While Leamir's answer is valid and correct, it would be much more efficient to do
script.Parent.Parent:Changed:Connect(function(property) if property == "Color" then script.Parent.Color = script.Parent.Parent.Color end end)