To add a parameter to a built-in signal, you need to bind the parameter when connecting the signal. There's an example here:
https://docs.godotengine.org/en/4.0/classes/class_object.html#class-object-method-connect
I remember seeing a better example, but I can't find it.
There could be other mistakes in your code.
Please use ~~~ before and after the code, so that it will be indented property. Also provide your Godot version. I'm guessing it's 4.x.