Build Interactive Portals and Sliding Doors
Create two convenient lobby interactions with clear prompts and predictable server behavior.
Set up the portal pair
Create PortalA and PortalB on open floors. A prompt should move the interacting player's model to the opposite pad with an upward offset. Make room for larger avatars at both exits. Use the server to teleport the character, and rate-limit each player separately so simultaneous users do not interfere.
Give the doorway its own state
Create LobbyDoor and DoorPanel beside the entrance. Store the closed frame at startup. Multiply it by a local-space translation for the open position so the door works even if the build is rotated. Lock the interaction from the start of opening until the closing tween ends.
Playtest the paths
Teleport while facing different directions and try the door from each side. If the opening panel moves into a wall, adjust the signed local offset instead of changing the room's layout.
Mark where a player should arrive
Choose two floors that are easy to tell apart, such as a blue workshop and a green garden. Put an anchored PortalA on the first floor and PortalB on the second. Face each pad toward the safe route you want players to see on arrival. Reserve clearance on all sides and above. If you need the arrow on the pad to point back toward a wall, add a second marker for the actual destination rather than using the pad's orientation. Players should arrive far enough from the activation point that their next movement does not immediately open the return prompt. Check the arrival spot with the largest avatar you plan to support.
Treat movement as a server action
When a player activates a prompt, work from that player's current character. Check that the model is still present before moving it. Pivot the whole character to the destination and add a small vertical offset. The prompt handler should never need the player to submit an arbitrary position. The destination comes from a pair you placed in the scene. Keep a per-player cooldown so players can travel in both directions together without blocking each other. Use an arrival light or sound to show which pad a visitor used. If a player lands in the floor, inspect the destination's CFrame and height before increasing the cooldown.
local arrival = destination.CFrame + Vector3.new(0, 4, 0)
character:PivotTo(arrival)
Build a door with a positive stop
Make the LobbyDoor and DoorPanel parts and leave enough space for the door to slide at its intended height. Record the closed CFrame before the first interaction. Calculate the open frame by applying an offset in the door's local coordinates. This way, rotating the doorway in Studio changes the direction of travel with it. Move the prompt panel out of the sliding path and put it on the accessible side. A player should be able to trigger the door with a clear view of the entrance. During the first test, watch the path from above. It is easier to spot where a door clips through a nearby wall from that angle.
Decide how the doorway handles a crowd
Set the busy flag before starting the opening tween. Keep it set while the entrance is open and during closing. If two visitors activate the panel close together, both can walk through one opening. The second activation should not pile another tween on the same part. If your game needs a door that stays open while a player is standing between the jambs, add occupancy logic before using it as a crowded entrance. The linked sample uses a fixed hold time, which is intentionally straightforward for a test lobby. Restore the exact closed CFrame when the movement completes so repeated use doesn't shift the door away from its frame.
Test prompt ranges and return travel
Start a two-player session. Have the first visitor travel from PortalA while the second starts from PortalB, and see whether each arrives independently. Try to travel back immediately and see how the cooldown feels with the prompt still in view. For the door, approach from the near side and try triggering it midway through its movement. Let it complete several open-and-close cycles. Check that the same collision gap exists on every open cycle and that the panel is still accessible when closed. Finally, rotate both test installations and repeat the route, which reveals world-axis assumptions and hard-coded arrival directions.