BindableEvent not receiving events

My bindable event isn’t working, when i try to fire it it doesn’t do anything and somehow prevents not only the script below the fire, but also the code above it. The receiving script also doesn’t fire. But when i put an error in the receiving script. Somehow all the code runs and it displays the error i put there.

Script that fires the event:

        local a = script.Parent
local detector = a:WaitForChild("ClickDetector")
local defaultC = a.Color
local clickC = Color3.new(0.5,1,0.5)
local event = a.Parent.Parent.ClickEvent
detector.MouseClick:Connect(function(plr)
	print("test")
	event:Fire(plr,a,a.Parent)
	a.Color = clickC
	wait(0.1)
	a.Color = defaultC
	print("clicked")
end)

a = script.Parent
event = a:WaitForChild("ClickEvent")

function click(plr,button,row)
	print(plr.Name .. " clicked button " .. button.Name .. " on row ".. row.Name)
end

event.Event:Connect(click)

Output without error (nothing):

Output when in the receiver script i remove the “.Name” from each parameter to create an error:

I am really confused.

Are they both server scripts? –

yes
image
image

I tested your code, it works for me. didn’t change anything
image

1 Like

Weird. I will create a new script and paste it into there just to be sure. And restart studio.

Ok. If it doesnt work, can you send me a screenshot of where you put the scripts and event?

Nvm i restarted studio, didn’t change anything and it works now.

So problem solved i guess?
Thanks for replying!

1 Like