Weapon Shoot Trigger

Hii.

How can I make that my weapon shoot function triggers?
This is the weapon script:

This is the enemy script that should shoot the function:

As long as both the Custom Event and Custom Event Trigger reference the same GameObject, it’ll trigger. Your enemy script tries to trigger Shoot custom event on “weapon” Object variable. Is your weapon graph also on “weapon” variable’s GameObject?

1 Like

Yes it is

Are you trying to reference a prefab from Project Window? If so, that won’t work since prefabs are like templates that don’t exist in scene unless added to Hierarchy. You need to reference GameObjects from Hierarchy.

Really? I didn’t know it. I will try to change it to the one on the Hierarchy

It actually worked