BindableEvent help

so I’ve been working on a fighting game, and I’ve been trying to add counters, but it doesn’t seem to really work as I intend. So basically the damage module sends a BindableEvent event over to the person’s ability script (its a server script) and it’s meant to return the Countered variable, which is true or false. However, it returns nil. Since these BindableEvents are kind of new to me, I have no idea what I am doing wrong.


 		local z= game.ServerStorage.ImportantEvents.CheckForCounter:Fire(Enemy)
		if z == true then
			Countered = true
			Countered = false

Ability Script:

	if victim == Player.Character then
		return Countering

If you’re expecting a return value, think you might need to use BindableFunction instead of a BindableEvent

Also some advice, you can set Countered to be equal to z instead of using an if statement in this case

Thanks for telling me about BindableFunctions!

and the advice, I had it like that originally but it didn’t work at all so I kept trying to see any change (there was none)

1 Like