OnHatPickup(AStaticMeshComponent* HatSM) should be written as OnHatPickup(UStaticMeshComponent* HatSM). But thank you anyway for answering this question.You gave inspiration that I should declare a HatSM variable inside my player character class, and show the mesh on the Hat class is pickup up. I will try this implementation.