Fire bullet from picked up gun

I’m making a top down game, and currently struggling to make bullets fire from a gun that my character picks up, I’ve seen other pages and videos but they already have a gun equipped and I’m not sure how to do it.

What I want is, when the player collides with the gun, he picks it up (which he does) and when a key is pressed for a single bullet to fire in the direction the player is facing, preferably with 0 arc.
I’ve done the “fire a bullet” behaviour and added it to the player, I don’t know the code for what I want it to do. maybe a variable or something, tho i am quite new and dont know much about it

Hi, the problem might be that you attach the ‘Fire Bullets’- behavior to your player but you fire the bullets with your gun. If player and gun are separate objects you need to apply the behavior to your gun instead.

The parameters for the behavior are quite straightforward and you just need to experiment a bit.

oh, well i did put it on the gun before, but thanks for confirming

So does it work now? Edit: I just saw and replied to the other post.