How to set an object reference of an actor that is spawned in?

Thank you! I’ve got the new script set up now, but I’m running into an issue as when I cast to the player it says it does not inherit from player controller and the items are no longer spawning in