Hello DevFourm, I have been working on a horror game. In this horror game, I want some lights to flicker. However, I scripted a script to make a point light look like it’s flickering when changing the light parts material to SmoothPlastic making it look the light has turned off. but the script flickers the point light but dont change the material. The light part is on the “StreetLight” model. (I don’t know that changes anything)
Here’s the Script:
local Light = script.Parent
local EmmitPart = script.Parent.Parent
while wait(5) do
Light.Brightness = 0
EmmitPart.Material = Enum.Material.SmoothPlastic
wait(0.1)
Light.Brightness = 5.26
EmmitPart.Material = Enum.Material.Neon
wait(0.3)
Light.Brightness = 0
EmmitPart.Material = Enum.Material.SmoothPlastic
wait(0.4)
Light.Brightness = 5.26
EmmitPart.Material = Enum.Material.Neon
wait(0.3)
Light.Brightness = 0
EmmitPart.Material = Enum.Material.SmoothPlastic
wait(0.5)
Light.Brightness = 5.26
EmmitPart.Material = Enum.Material.Neon
wait(0.2)
Light.Brightness = 0
EmmitPart.Material = Enum.Material.SmoothPlastic
wait(0.3)
Light.Brightness = 5.26
EmmitPart.Material = Enum.Material.Neon
wait(0.3)
Light.Brightness = 0
EmmitPart.Material = Enum.Material.SmoothPlastic
wait(0.2)
Light.Brightness = 5.26
EmmitPart.Material = Enum.Material.Neon
end
Thanks For You’re Help