@DevHelpAccount (DevStar) posted a new topic, subject "Help with this script". It read:

   I want it so every player that is standing in a tunnel when the timer goes, is teleported to a server of the game. I know how to do the teleporting bit, but not for a group of players.  
    robloxapp-20210731-0902339.wmv (2.9 MB) Please help. I can't figure this out. How would I teleport only the players that are standing in the area?
      *[tables]: with mixed keys, including userdata!

Then @DevHelpAccount (DevStar) said

    Sorry that the video is a download. 
      *[tables]: with mixed keys, including userdata!

So @THECOOLGENERATOR (PerdiIcarus) replied

    First, you need to set up a Region3.  
    Region3.
    
    Next, loop through all the parts.
    [code] 
        local PlrsToTp = {}
        
        for _, Part in pairs(workspace:FindPartsInRegion3(YourRegion)) do
          if Part.Parent:FindFirstChild("Humanoid") then
              if game.Players:GetPlayerByCharacter(Part.Parent) then
                table.insert(PlrsToTp, game.Players:GetPlayerByCharacter(Part.Parent))
             end
          end
        end
        
    [/code]
    
    Finally, use this:  
    https://developer.roblox.com/en-us/api-reference/function/TeleportService/TeleportPartyAsync
      *[tables]: with mixed keys, including userdata!

Then @DevHelpAccount (DevStar) said

    I made it work without a region 3 using this:
    [code] 
        local timer = game.StarterGui.timer
        local inpart = workspace.inpart
        local plr = game.Players.LocalPlayer
        local text = plr.PlayerGui:WaitForChild("ScreenGui").intext
        local plrs = game.Players
        local text1 = text.intext1
        text.Visible = false
        
        local Players = game:GetService("Players")
        
        local function PopupReady(hit)
        	local player = Players:GetPlayerFromCharacter(hit.Parent)
        	if player then
        		text.Visible = true
        	end
        end
        
        local function PopupGone(hit)
        	local player = Players:GetPlayerFromCharacter(hit.Parent)
        	if player then
        		text.Visible = false
        	end
        end
        
        inpart.Touched:Connect(PopupReady)
        
        inpart.TouchEnded:Connect(PopupGone)
        
    [/code]
    
    so I don't think I'll be needing that…
    
    If I did need that, what do you mean by,
    
    THECOOLGENERATOR:
    
    > First, you need to set up a Region3.
    
    ?
      *[tables]: with mixed keys, including userdata!

Then @THECOOLGENERATOR (PerdiIcarus) said

    Oh, it'll still work without Region3. Just use the `TeleportPartyAsync`.
    
    Also, you must do this in a server script.
      *[tables]: with mixed keys, including userdata!

So @DevHelpAccount (DevStar) replied

    so, did you watch the video. That script I just showed you, is what makes the “You're in!” text pop up. do I copy that into ServerScriptService? obviously, if I did, I would tweak it so that it wasn't controlling the popup, lol.
      *[tables]: with mixed keys, including userdata!

@DevHelpAccount (DevStar) replied

    Can you please walk me through what I should do. I am confused.
      *[tables]: with mixed keys, including userdata!

@THECOOLGENERATOR (PerdiIcarus) replied

    Ok, so do the Region3/Teleport steps above. You put the `FindParts` in a loop. Then loop through all the players and make the popup visible
      *[tables]: with mixed keys, including userdata!

After which, @DevHelpAccount (DevStar) added

    How can I do it without using region 3?
      *[tables]: with mixed keys, including userdata!

@THECOOLGENERATOR (PerdiIcarus) replied

    Without using that it would be less reliable, but you can use `.Touched` with a part in the zone you would like. Then just insert the player in a table and teleport all players in that table.
      *[tables]: with mixed keys, including userdata!

After which, @DevHelpAccount (DevStar) added

    Is there a way to find all the players up to, say 5 (The maximum players that can come at a time is 5 in my game) and then put them in a list, `if timer =< 0 then`  
    `--(Teleport all players who are touching the part.)`  
    `--This is the bit that I need help with.`
      *[tables]: with mixed keys, including userdata!


{'source': 'discourse', 'url': 'https://devforum.roblox.com/t/help-with-this-script/1385068', 'title': 'Help with this script', 'views': 212, 'has_accepted_answer': False, 'word_count': 495, 'like_count': 2, 'reply_count': 7, 'participant_count': 2, 'posts': 11, 'tags': '', 'author': '@DevHelpAccount (DevStar)', 'participants': '@DevHelpAccount (DevStar), @THECOOLGENERATOR (PerdiIcarus)', 'image_url': [None], 'created_at': '2021-08-01T07:26:21.604Z', 'last_posted_at': '2021-08-01T10:04:03.971Z'}