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

How do you make a light flash when a button is pushed?

When a brick/part is clicked, how do you make other lights flash for a certain amount of time?

2 comments

0

not request site

0

So many people are doing this today.

1 answer

✓ Accepted answer

You can place a Script like this under the part. Please read the comments though and try to understand how this works by doing more research. This is a website that will only HELP you.

script.Parent.MouseButton1Click:Connect(function()
	for i = 1, 10 do -- second number will indicate how many times you want this to occur so it doesn't have to be 10
	local lights = game.Lighting:GetChildren() -- I'm just assuming that your lights are in Lighting
		if lights.Enabled = false then
			lights.Enabled = true
			wait(0.5) -- however many seconds you want the lights to stay on and it can be a decimal too. If you want flashing lights, then i suggest going for around 0.5
			lights.Enabled = false
		end
	end
end)

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