I'm trying to make a light flash repeatedly but it isn't working. This is the script I have inside the light.
Light = script.Parent function FlashLights() repeat wait(math.Random(.2,2)) Light.Material = "Neon" wait(.2) Light.Material = "SmoothPlastic" until false end
It's probably an obvious mistake but there's no error messages and I'm confused about what I did wrong.
Hello. This is actually an easy fix. This is a function and it has never been called. In order for your script to work you need to call it first, and you want the light to repeatedly flash constantly right? So this is what your code SHOULD be:
light = script.Parent function flash() Light.Material = "Neon" wait(.2) Light.Material = "SmoothPlastic" end while wait() do wait(math.random(.2,2)) flash() end