Games listed 44,616
Roblox

How to Make a Roblox Escape Room Puzzle With ProximityPrompt

How to Make a Roblox Escape Room Puzzle With ProximityPrompt

Build a three-switch puzzle in Roblox Studio. Players find the clue, press blue, yellow, and green in order, and open a shared door. This example uses a server Script and works as a starting point for a multiplayer room.

Build the room in Explorer

Object Location Setup
PuzzleRoom Model in Workspace Contains the panel and door
Door Part in PuzzleRoom Anchored and CanCollide on
Panel Model in PuzzleRoom Contains three buttons
Blue, Yellow, Green Parts in Panel Add a ProximityPrompt under each

Use more than color

Add a symbol to each button and set ActionText to “Press.” Put the buttons far enough apart that mobile players can select the intended prompt.

Check the sequence on the server

Image from: ESCAPE CLUB | Escape Rooms

Add a Script to ServerScriptService. Keep the names in Explorer exactly as shown. A wrong input resets the sequence. A right sequence disables the door collision and changes its transparency.

local room = workspace:WaitForChild("PuzzleRoom")
local panel = room:WaitForChild("Panel")
local door = room:WaitForChild("Door")
local order = { "Blue", "Yellow", "Green" }
local nextStep = 1
local solved = false

for _, color in ipairs(order) do
    local button = panel:WaitForChild(color)
    local prompt = button:WaitForChild("ProximityPrompt")
    prompt.Triggered:Connect(function(player)
        local character = player.Character
        local root = character and character:FindFirstChild("HumanoidRootPart")
        if solved or not root then return end
        if (root.Position - button.Position).Magnitude > prompt.MaxActivationDistance + 2 then return end

        if color ~= order[nextStep] then
            nextStep = 1
            panel:SetAttribute("Step", 0)
            return
        end
        panel:SetAttribute("Step", nextStep)
        nextStep += 1
        if nextStep > #order then
            solved = true
            door.CanCollide = false
            door.Transparency = 0.75
        end
    end)
end

The state is shared by all players connected to that server. A new server starts with a closed door. Add a separate reset routine before using the script in a timed, repeated round.

Playtest all three paths

Image from: ESCAPE CLUB | Escape Rooms
  1. Correct sequence

    Press Blue, Yellow, and Green, then walk through the door.

  2. Wrong sequence

    Press Blue then Green and start over from Blue.

  3. Two clients

    Use Server & Clients to confirm that different players can contribute to a shared solution.

Study how another escape game teaches its rooms

ESCAPE CLUB | Escape Rooms
ESCAPE CLUB | Escape Rooms
Rating86.3% Playing2,545
Is this game fun?18 votes
Fun 78%14Average 11%2Not fun 11%2

Look at where a player first sees the clue and where they enter the answer. Keep that distinction when you set up the second room in your own prototype.

Make a trailer that leaves the solution intact

Image from: ESCAPE CLUB | Escape Rooms

Film a player noticing the clue and the door opening. Cut away from the complete sequence so there is still a puzzle to solve after a player joins.

Promote your Roblox game with MetaNew

Reach Roblox players through sponsored placements in search, on the homepage, and alongside relevant guides and codes.

See sponsorship options →

FAQ

Why does the button do nothing?

Check Output, the Explorer names, and whether each button has a ProximityPrompt below it.

Can every player have their own puzzle?

Yes. Key the progress by player or team and decide which door behavior is visible to whom before adapting the script.

References and Image Sources

  1. Roblox Creator Hub | Proximity prompts
  2. Roblox Creator Hub | Studio testing modes

Related guides

Explore metanew

Explore
Find games by filter See the top charts All working codes
日本語でRobloxゲームを探す
Add it to your home screen and it works like an app. One tap to open, and it loads faster after that.