Bindable Event Not Firing

  1. What I Want To Achieve: I am trying to make my script cleaner for a round system.

  2. What is the issue? Trying to use bindable events but the events are not firing for some reason.

  3. What solutions have you tried so far? I have looked at a few other posts but have not found a solution. I have also tried rearranging/rewriting my code.

A function from the main script: (All the other functions are like this so here is one, but if more of the script is needed let me know)

-- All the functions are put in a while loop if that matters
function StartRnd()
	Remotes.StartRound:Fire(Players, Status, Teams, Remotes, GameSpawn, DefaultMusicIds, CustomMusicIds, SeatedPlrs, playersInGame)
	MainModule:CheckBEFORERnd(ResetChairs, StartRoutine, playersInGame, SeatedPlrs)
	_G.tpcheck = false; 
-- I know it is still a bit messy, it is better than what it was before though.
end

Also, here are my variables for the above line of code:

local MainModule = require(game.ReplicatedStorage.MainModule)
local Players = game:GetService("Players")
local Status = game.ReplicatedStorage["Status"]
local Teams = game.Teams
local Remotes = game.ReplicatedStorage:FindFirstChild("Remotes")
local GameSpawn = game.Workspace.GrassMap.StartSpawn
local DefaultMusicIds = {927037476, 2624361362}
local CustomMusicIds = {}
local SeatedPlrs = {}
local playersInGame = {["In"] = {}, ["Out"] = {}}	

Thanks for any help, I am really stuck.

Can you show the script that receives the event?

Okay, so I have numerous scripts for each bindable event. Each script’s parent is under the bindable event I want it to be in. So I guess I’ll show you the script that goes with the StartRound event. Let me know if it isn’t enough.

local MainModule = require(game.ReplicatedStorage.MainModule)

script.Parent.Event:Connect(function(Players, Status, Teams, Remotes, GameSpawn, DefaultMusicIds, CustomMusicIds, SeatedPlrs, playersInGame)
	wait(1)
	Status.Value = "Music will stop randomly!"
	MainModule:PlayMusic(DefaultMusicIds, CustomMusicIds)
	wait(math.random(1,15))
	Remotes.MoveTrue:FireAllClients()
	wait(0.05)
	game.Workspace.Walk.Disabled = true
	for i,v in pairs(game.Players:GetChildren()) do
		local AllChars = v.Character or v.CharacterAdded:wait()
		if v.Team == game.Teams.In then
			AllChars.Humanoid.WalkSpeed = 16
		end
	end
end)

It looks like your bindable event is a child of the receiving script, however, since your bindable event is placed in a “Remotes” folder within replicated storage, the script may not run as it is parented within replicatedstorage. According to Roblox’s developer hub on scripts, for a script to run, it must be placed either in the workspace or in serverscriptservice.

1 Like

Thank you, I somewhat got it working!

1 Like