Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a Flashing lights ?

Can someone help me? I want make a Flashing lights that will make point light blink per a custom time. Just like the one in breaking point.

1 comment

0

I'd also like to learn how to do this

1 answer

They probably have a PointLight Instance in a part and they change the Enabled property.

while wait(math.random(2,4)) do -- //  Wait a random number of seconds between 2 and 4.
	for i = 1, math.random(2,5) do  -- // A random number of blinks.
		PointLight.Enabled = true
		wait(0.25)
		PointLight.Enabled = false
	end
end

4 comments

0

while wait() do is bad practice.

0

wait() without any indicated second(s) is a bad practice in most cases. There is nothing wrong with while wait(n) do. Who ever told you that has gotten false information.

0

There is something wrong with while wait() do bruh, it's DEPRECATED, misleading, unclear, and the behavior of this idiom ain't even documented bruh. You probably don't even know why it works

0

Show me where you got the information from, what your saying aren't facts unless you have some kind of evidence from the documentation to back it up. Or even some intellectual person on the DevForums.

This discussion is preserved as it was. New answers, comments, and votes are closed.