But according to the script in lootpickup, it’s the SimpleAI that collects it. So, unless your player is also a SimpleAI, then that cast is wrong.
But maybe I’m just interpreting this all thing wrong. So, assuming I’m wrong, then you can set a tag in the player, and on overlap event with the pickup, check if the overlapped actor has that tag. If yes then collect, else ignore.