Bindable Event NOT Receiving Event

repeat
	warn("No Players Yet")
	wait(1)
until #Players:GetPlayers() > 0

function StartIntermission()
	
	for i = 20, 0, -1 do
		
		TextLabel.Text = "Intermission: "..i
		wait(1)
		
		if i == 0 then
			
			TextLabel.Text = ""
			
		end
	end
	
	if #Players:GetPlayers() > 1 then
		
		StartRoundEvent:Fire()
		TextLabel.Text = "Choosing Map"
		print("Fired Start Round Event")
				
	else
		
		TextLabel.Text = "Atleast 2 players needed"
		NotEnoughPlayersEvent:Fire()
		wait(4)
		TextLabel.Text = ""
		wait(1)
		StartIntermissionEvent:Fire()
		print("Fired Intermission Event") -- This prints
		
	end
end

StartIntermission()

StartIntermissionEvent.Event:Connect(function()
	
	print("Before Starting Function Again") -- This doesn't print
	StartIntermission() -- This doesn't happen
	print("After Starting Function Again") -- This doesn't print

end)

I have no idea why StartIntermissionEvent is not receiving the event. It is firing because the print after the Fire() function prints.

There are also no errors in output.

Any help is appreciated!

You call StartIntermission() before you connect the event to anything. Therefore nothing happens when you fire the event. Try replacing the last part of the script with:

StartIntermissionEvent.Event:Connect(function()
	
	print("Before Starting Function Again")
	StartIntermission() -- This doesn't happen
	print("After Starting Function Again")

end)
StartIntermission()
1 Like

Oh wow, I put the connection on top of the StartIntermissionEvent function, but I guess it needed to be on the bottom.

Thank you! It works perfectly, I wouldn’t have thought about that!