Making a Detection Script for a Door

Can you send me a link to the Module?

its pretty simple to use just read the example inside the post and add the model to your place

1 Like

Don’t rely on RemoteEvents when you can just handle it all on the server;
because 9 times out of 10,they’ll be insecure and exploitable.

Use Region3, detect players within that region, add them to a table, if it matches your specific amount of players,
teleport them to the game.

You’ll also need to detect when they’re not within that region and adjust accordingly.

Just noticed somebody provided you a easy-to-use module, use that and read the usage.

Hm…It doesn’t have what I’m looking for.

erm…hehehehe, I do not know how to do that.

Region3 | Roblox Creator Documentation

Region3 ( - has a code sample

1 Like

Hm…I didn’t see a code in there…

I looked into ZonePlus, it would be more than suitable for your needs.

Introduction - ZonePlus (

1 Like
-- Assuming we place ZonePlus in ReplicatedStorage
local Zone = require(game:GetService("ReplicatedStorage").Zone)
local container = workspace.SafeZoneContainer
local zone =

    print(("%s entered the zone!"):format(player.Name))
    -- do something

    print(("%s exited the zone!"):format(player.Name))
    -- do something

local playersArray = zone:getPlayers() -- gets current players within zone, teleport them after a countdown

Not be nasty, but next time do a bit more research as not everyone is as nice as me. From what I’ve noticed, anyway. Take care and hope this helps!

1 Like

Thanks! Maybe i can modify it? Like in Doors?

Assuming it’s a Localscript?

When they touch the door, teleport them into the zone and then those events will help you work with the rest. (.playerEntered(), .playerExited())

Create a loop that constantly checks how many players are within the zone, if it matches the specific amount of players, do a for loop for a countdown and teleport the players to the specified place. You’d also want to add a check when a player leaves the zone mid-countdown; it is up to you if you let it continue or cancel.

No, a ServerScript. As it will be handled by the Server - well, you’d want it to be.

So it’s a Scripts in ServerScriptService, because of it’s handling the Server?

It is a ServerScript you would want to place in:


because you would want it to be handled by the server and not the client.

1 Like

So how do i make it Connect() to the Door Detectors?

You have no scripting experience at all, do you?

Provide the door detector script(s) so we can provide help.

About the Doors, Nope - True

But anything like Close/Open, Baseplate:Destroy and changing the Baseplate Color and Transparency and making it CanCollide = true then yes, I do have knowledge on that, I just started learning Lua a week ago…

I would personally suggest you get some more experience as you’re moving way out of your league too quickly.

That is the best advice I can give you, pursue this when you’re confident. You won’t be able to compete with games like Doors with little to no knowledge.

Go learn, you got this!

1 Like

You can always bookmark here and come back when you have more confidence to pursue the game,
as nobody here will write all the scripts etc for you without being paid.

1 Like