Help wit BindableEvents

So I am having problems with using a BindableEvent to fire an explosion when a “projectile” hits something. I tried with “print()” to verify if the function was working. Simply I can’t get the second script (the one waiting for the event to fire) to do anything.

I was using all the scripts I am talking about inside ServerScriptService. MakingExplosion is the first script, firing the event.
The second one is EventHandler, which I was trying to use for waiting the event to fire.

The text “Fired” is printing from MakingExplosion
The text “FIRED” is not printing from EventHandler, even if the event was fired.

I tought about this and maybe I placed the scripts in weird places?
Or I really don’t know.

Btw sorry for my bad english, I’m not usual at it.

Screenshot 2022-07-23 064102

.
.
.

Making Explosions
local light = script.Parent

local explosion = game.ServerScriptService.LightWorking.Explosion

local event = script.Event


light.Touched:Connect(function(Hit)
	print(Hit)
	
	local owner = script.Parent.Owner
	
	if Hit.Parent.Name ~= owner.Value then
		
		event:Fire(light.Position)
		
		light:Destroy()
		
		print("Fired")
		
	end
end)
EventHandler

local exEvent = game.ServerScriptService.LightWorking.LightPart.MakingExplosion.Event

exEvent.Event:Connect(function(exPosition)
local exPart = game.ServerScriptService.LightWorking.Explosion

local exClone = exPart:Clone()
exClone.Position = exPosition
exClone.Parent = workspace
exClone.Transparency = 0

print("Summoned Explosion")

end)

exEvent.Event:Connect(function()
print(“FIRED!”)
end)

For any information needed just ask, I will respond asap

That’s because the exEvent is different.

What do you mean? On the first script the “event” location is

local event = script.Event

End the script location is:

game.ServerScriptService.LightWorking.LightPart.MakingExplosions

In the EventHandler Script, the location of the exEvent is

local event = game.ServerScriptService.LightWorking.LightPart.MakingExplosion.Event

Isn’t this the same location.

Could You please what do you mean for “different”?

Lets say for example you cloned the Object LightPart, and change the location, it will fire on a different Event not the same from the server script service; also why do you have objects on server script service, put it on server storage, server script service is meant for scripts not objects, that’s why server storage exist for objects, it’s the sole reason for cleanliness.

Ok, thank you for the explanation. I will try to use ReplicatedStorage for my objects instead.

ReplicatedStorage is shared across the client and the server, while ServerStorage is meant for the server to read only/see what’s inside.

Do you want all of the player to see this object/instance? Exploiters can access this very easily.

Oh I red it before the changes, I guess I’ll use ServerStorage then.

Did you understand the problem?

Yeah I did. Thank You for helping me.

1 Like