RPC from a child object?

Options
I want to add weapon pickups and I'm stuck, as the only way i can add the pickup is to make the weapon a child of the player. However, this means the gun can't shoot as it can't call the RPC. How can i get around this?

Best Answer

Answers

  • bump
  • I'll try and rephrase it since it sounds a bit unclear. My gun script is currently on the player and I want to add weapon switching. I don't want to add multiple gun scripts for the player because I can't expand that for pickups, and I can't parent the gun with the script already on it to the player, as the script needs RPC's to be called, and I can only call those RPC's from the actual player itself. Is there any way I can get around this? I've tried observing the gun in the photo view and even tried going through the code to edit it and find a way around, no such luck though.
  • Bump
  • Bump
  • LeytonMate
    edited November 2019 Answer ✓
    Options
    Can you lot answer me?