✓ Accepted answer
The first thing I say when someone says they had no error output is are you sure you are not using a local script. Make sure if you are making changes to anything in the workspace that you are working on a normal script.
Secondly, if you are trying to change the colour of a Point Light, you will need to make use of the Color3 type. What you are doing now is trying to give it a string. This would be a solution if you paired it with the BrickColor type however this doesn't work with Point Lights as they do not have BrickColours.
So to fix your script, we will be utilising Color3.fromRGB(). You will need to begin with changing the lightpart.BrickColor to lightpart.Color for all 4 as BrickColor isn't a property in Point Lights. You will then need to find RGB values for each colour. You can do this by googling "color picker" and taking the 3 RGB numbers.
I have found the appropriate colours for you and have left the fixed version of the code below. I hope you understood and wish you all the best :)
local lightpart = script.Parent.Parent.Parent.Light
local light = lightpart.PointLight
script.Parent.MouseClick:Connect(function()
wait(1)
lightpart.Color = Color3.fromRGB(235, 64, 52)
wait(1)
lightpart.Color = Color3.fromRGB(251, 255, 0)
wait(1)
lightpart.Color = Color3.fromRGB(68, 255, 0)
wait(4)
lightpart.Color = Color3.fromRGB(181, 181, 179)
end)
1 comment
This will help me in the future. Thanks!