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

I need help with my error, I don't know how to fix it. I'm pretty sure it's the line 2?

Can anybody help, I don't know what's happened. Yesterday and long time ago it was functioning.

Error: 10:37:30.072 - Workspace.Part.PointLight.Script:10: Expected 'end' (to close 'then' at line 2), got

if workspace.Meltdown.Alarm.Playing == true
then
	
	print ("PointLight Flash 1 Enabled!")
	while true do
script.Parent.Color = Color3.new (255, 0, 0)
wait(0.2)
script.Parent.Color = Color3.new (255, 255, 255)

end

2 answers

✓ Accepted answer

Hello there! You just missed an end for the while loop to close!

if workspace.Meltdown.Alarm.Playing == true then

 print ("PointLight Flash 1 Enabled!")
while true do
script.Parent.Color = Color3.new (255, 0, 0)
wait(0.2)
script.Parent.Color = Color3.new (255, 255, 255)
end

end

Make sure to up-vote and select this as your answer if it helped!

2 comments

0

Oh wow, I really forgot one end.

0

Also make sure to accept this answer!

Hi coolgamingguyYT!

Try something like this:

if workspace.Meltdown.Alarm.Playing == true then
	print("Pointlight Flash 1 Enabled!")
	script.Parent.Color = Color3.new(255,0,0)
	wait(0.02)
	script.Parent.Color = Color3.new(255,255,255)
end

Hope I helped!

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