I would recommend using this module:
Get the player, and then when touching the safe part, use a client sided script to disable your inventory/backpack GUI.