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

Is it possible to tell when a BindableEvent has finished running?

I'm currently making a game that's like a lobby/map game, but each round lasts irregular intervals.

The concept of the game is to race each other completing obstacle courses. When someone takes first place, other players have 300 seconds left to finish.

The easy part is telling what the events need to do. The hard part is scheduling the events so they run one after another.

Here's what I have in the script that schedules the events.

rounds = game.Workspace.RoundEventHandler
pmap = game.Workspace.PreviousMap
cmap = game.Workspace.CurrentMap
maps = game.ServerStorage.Legs

randomtwist = game.Workspace.RandomTwist

script.Round.Event:connect(function()
	wait (10)
	rounds.Intermission:Fire()-- starts intermission
	wait (34)
	rounds.Starting:Fire()-- starts the beginning of the race
	game.Workspace.EventHandler.Randomtwist:Fire()-- fires an event that chooses a random number
	wait (34)
	if game.Workspace.RandomTwist.Value == 2 then-- if the random number is two, then 
		rounds.Twist:Fire()
	end
	
end)

I find this REALLY inefficient, because i need to put waits() everywhere. Also, the script used to be a while true do loop, but I changed it to an event of its own, because while true do loops start over again after the last line runs.

1 answer

Even though I cannot get this to work for some reason, BindableEvents's Event property is a Signal, so you can use the wait method, maybe.

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