One player carrying around another player?

Options
I'm working on a project where ideally, I would want my player to be able to for example press "E" on another player that is disguised as a prop. When my player does this, this prop player has no control over their position/rotation. But my player can "pick up" that player and hold them infront of the camera and walk around while holding them. Think of the gravity gun from Garrysmod, exact same behavior. I'm just trying to find the cleanest way to do this and am open to any and all suggestions. Is it okay if I transfer ownership of this player object to another player? and perhaps just transfer it back when i'm done holding it?

Comments

  • Tobias
    Options
    Sorry for the late reply.
    For anything to do with pickups and mounting/reparenting objects, I would recommend looking into the Simple addon for PUN 2:
    https://github.com/emotitron/Simple_Addon_for_Pun2

    It's a tick based system and supports pickup much better than vanilla PUN 2 does.
    There is a "Simple" channel in our Discord server to ask questions.
  • James_MF
    Options
    I will check this out! Thanks so much!