Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make the PointLight color change as well?

Asked by 4 years ago

I am using a simple light-board model, with buttons, to attempt to change the part's BrickColor and the color of the PointLight, on click. As of now, the BrickColor changes, but not the color of the PointLight. Is there anything I might be doing wrong or is there anything that can improve the script?

script.Parent.MouseButton1Click:connect(function()
local p = game.Workspace.StageLED:GetChildren()
local leds = game.Workspace.StageLED.LED
for i = 1,#p do

p[i].BrickColor = BrickColor.new("Really black")
leds.PointLight.Color = Color3.new(0,0,0)

end
end)

Answer this question