Skip to main content
Discovery icon for Retro Dev Discord server

Retro Dev

5,152 Online
44,244 Members
# retro-chat3 people

door access scripting

Two different approaches are suggested for scripting a door that opens based on a player's gamepass ownership, involving `player added` or `part touched` blocks.

  • One method uses a `player added block` (input `plr`) connected to a `part touched block` (input `object/part`, output `plr`). This then connects to a `hasgamepass block` (input `plr`, output `GamepassCheck` variable) and an `IF block` (input `GamepassCheck == True`) to trigger a 'door open' print statement.
  • A refinement to the first method suggests using 'Player' as the input instead of 'plr' for consistency in the `player added` and `hasgamepass` blocks to avoid errors.
  • An alternative approach suggests enabling local variables, then using a `part touched block` with `script.Parent` as input and `hit` as output. This is followed by a `find first child of class` block where the parent is `hit.Parent` and the child is `Humanoid` (or `hum`).
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App