I am trying to make a disco light. I have it set up so when I click a button a loop will happen and switch between colors. But in order for that to work I first need to find out how to change the pointlight color in a script. In order for me to set up the loop I need to figure this out first.
local Light9 = game.Workspace.Light9.PointLight
function onClicked(playerWhoClicked)
Light9.Brightness = 100
Light9.Range = 60
Light9.Color --This is where I need help.
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 comment
If you want a simple solution you should be able to use, BrickColor.random().Color as this creates a random brick color then you just use the Color3 object of the brick. You will need to handle the looping part though.