How would I disable my pick up item when I change my camera perspective

Hi there, Im new to unreal and Im still learning how everything here works. Currently, Im developing a game where the player can pick up objects, and I decided to add the possibility to change to first and third person, but I dont want the player to still be able to pick up objects while on the third-person view. Does anyone know how can I fix this issue?