Thanks for your time, Here is a screenshot:
see the model with multiple parts? Thats the lights (the white lines on the screen)
And the button is the red one on the color palette
The issue is that you didn’t put Workspace after game., so instead it should be;
local Color = Color3.fromRGB(255,0,0)
local lights = game.Workspace.Lighting.StageLights.Part
script.Parent.MouseButton1Click:Connect(function()
lights.Color = Color
end)
local lights = workspace.Lightning.StageLights
local color = Color3.fromRGB(255,0,0)
script.Parent.MouseButton1Click:Connect(function()
for _,lightPart in pairs(lights:GetChildren()) do
if lightPart:IsA("Part") then
lightPart.Color = color
end
end
end)
The issue is that there are multiple parts inside of the StageLights model and you’re only changing a single part. Also you’re refering to game.Lighting when your target folder is in the workspace
fixed code:
local Color = Color3.fromRGB(255,0,0)
local lights = workspace.Lightning.StageLights
script.Parent.MouseButton1Click:Connect(function()
for i, v in pairs(lights:GetChildren()) do
v.Color = Color
end
end)