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.