Why is my BindableEvent do nothing when it's fired?

Issues

Okay so I know this script works as it worked beforehand but not it refuses to work. It fires the event but doesn’t do anything.

Attempt

I’m attempting to combined this BindableEvent and a RemoteEvent into a singular script, they are to work separate but both be in the same script to prevent lag. I know that one script doesn’t cause TOO much lag but just for the sake of organization and it already being set-up, i’d like to try to get this functional.

Here's a photo of what I mean by it being in the same script but working separately.


Theory

I believe I’m missing an end function somewhere but I have no idea where.

Script

WARNING:This code is very long.

BindableEvent = game.ReplicatedStorage.LightingEvents.VenueLightingBindableEvent --[Yes it is there.]--
------------------------------------
BindableEvent.Event:Connect(function(Lighting,Name,Color)
---------------Colors---------------
	if Lighting == "Instant" then
		if Color == "Blue" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
					if v:FindFirstChild("PointLight") ~= nil then
						v.PointLight.Color = Color3.fromRGB(0, 0, 255)
						v.PointLight.Brightness = 2
					end
				end
			wait(0.01)
		elseif Color == "Red" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
		        if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(255, 0, 0)
					v.PointLight.Brightness = 2
		        end
		      end
		wait(0.01)
		elseif Color == "Green" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(0, 255, 0)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
		elseif Color == "Yellow" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
		        if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(255, 255, 0)
					v.PointLight.Brightness = 2
		        end
		      end
		wait(0.01)
		elseif Color == "Orange" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(255, 85, 0)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
		elseif Color == "Cyan" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(0, 255, 255)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
		elseif Color == "Purple" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(255, 0, 255)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
		elseif Color == "Pink" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(255, 0, 127)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
		---------------Black & White---------------
		elseif Color == "BrightWhite" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(255, 255, 255)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
		elseif Color == "White" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(255, 255, 255)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
		elseif Color == "Blackout"	then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(0, 0, 0)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
		elseif Color == "Black"	then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					v.PointLight.Color = Color3.fromRGB(0, 0, 0)
					v.PointLight.Brightness = 2
				end
			end
		wait(0.01)
	----------Fading Lights------------
	elseif Lighting == "Fade" then
		if Color == "Blue" then
				for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
					if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(0,0,255),nil)
					end
				end
			wait(0.01)
		elseif Color == "Red" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
		        if v:FindFirstChild("PointLight") ~= nil then
					TweenLight.Tween(v.PointLight,Color3.fromRGB(255,0,0),nil)
		        end
		      end
		wait(0.01)
		elseif Color == "Green" then
			for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
				if v:FindFirstChild("PointLight") ~= nil then
					TweenLight.Tween(v.PointLight,Color3.fromRGB(0,255,0),nil)
				end
				end
			wait(0.01)
			elseif Color == "Yellow" then
				for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
			        if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(255,255,0),nil)
			        end
			      end
			wait(0.01)
			elseif Color == "Orange" then
				for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
					if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(255,85,0),nil)
					end
				end
			wait(0.01)
			elseif Color == "Cyan" then
				for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
					if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(0,255,255),nil)
					end
				end
			wait(0.01)
			elseif Color == "Purple" then
				for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
					if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(255,0,255),nil)
					end
				end
			wait(0.01)
			elseif Color == "Pink" then
				for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
					if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(255,0,127),nil)
					end
				end
				wait(0.01)
			---------------Black & White---------------
			elseif Color == "BrightWhite" then
				for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
					if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(255,255,255),nil)
			        end
			      end
			      wait(0.01)
			elseif Color == "White" then
			      for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
			        if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(255,255,255),nil)
			        end
			      end
			      wait(0.01)
			elseif Color == "Blackout" then
			      for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
			        if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(0,0,0),nil)
			        end
			      end
			      wait(0.01)
			elseif Color == "Black" then
				for i, v in pairs(game.Workspace.VenueLights[Name]:GetChildren()) do
					if v:FindFirstChild("PointLight") ~= nil then
						TweenLight.Tween(v.PointLight,Color3.fromRGB(0,0,0),nil)
			      end
			    end
			  wait(0.01)
			end
		end
	end
end)

Thank you for any help you can give me.

1 Like

Does .Event event fire at all? If not, may I see how are you firing your bindable event?

1 Like

Here you go.

Any output if you add a print statement after .Event “runs”?

No, there is nothing when I do the print function.

So I’ve tried copying the code inside .Event event into my place and it seems to work just fine. Are you sure .OnServerEvent fires?

.OnServerEvent isn’t supposed to fire when the BindableEvent gets fired.
.OnServerEvent is for the RemoteEvent only.

But you’re firing a bindable event from .OnServerEvent

Which script are we talking about- I am an idiot…
So, I figured out my mistake… I had the Event programmed to the wrong name.