How to fix "As BP First Person Character" error?

For some reason, I followed the steps of this tutorial (How to Make a Simple Pause Menu in Unreal Engine 5 - Beginner Tutorial - YouTube) and it worked well, but there was an issue. The “As BP First Person Character” object reference doesn’t work for some reason. I know because I tested it and it seems to be the only issue, but I could be wrong.

Basically what is supposed to happen is that once the weapon hitbox has been touched, the actor gets deleted and placed into your hands. The issue is that now the actor gets deleted, but the gun doesn’t get placed into my hands.

Please help

You need to cast to the player that is picking up the object. Have you made a special player, or are you using the BP_FirstPersonCharacter?

I’m still using the BP_FirstPersonCharacter.

Does the cast work or fail? Can you show the error?

The cast works, how do I show the error?

So there’s no error, you just get no weapon?

Can you show the ‘add weapon’ code?

Yeah I get no weapon, I can shoot it and it all works perfectly, but it just doesn’t show. I checked the grip points as well and they are fine.

Is that cast working? If you pickup and hit F8 and have a look around, is the gun somewhere nuts, like the origin? ( also take a look for it in the outliner ).

The cast works, and I tried looking around and the gun isn’t there, even in the outliner.

Ok. I see you’re using ‘attach component to component’. How is the gun component made? Is there an array of them in the player, or do you spawn it, or…?

I have no idea :skull:, I didn’t touch this I think, so it’s still part of the pre-made content.

1 Like

Premade? Does it not cover this in the tutorial?

Sorry, not much help, but there’s so many ways you could be doing it. Somehow you have to create or have the skel mesh in the player, so you can attach it.

After some testing I think I found the error: I think the error is that the skeletal arms aren’t there for some reason. Normally the arms would appear when jumping, but it doesn’t appear, which leads me to think that the issue is that the arms just aren’t there for some reason, any way to fix this?

You might have set them to visible = no?

After some testing I think I found the error:

There is no mesh here for some reason, so there are no animations since there’s nothing to animate, and the gun isn’t there because since there is nothing there to attach to. I think this might be the issue.

1 Like