Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my place allow other people to join?

Asked by 2 years ago
Edited 2 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

Hey there, sorry for short question but i have a problem with my story game, when i teleport a person to the server, another person can goto another elevator after the group of players that got teleported to the game, and the "another person" gets teleported to the group of players's game, but i dont want that. Also yes i made the game in asset explorer. Can anyone help me? Also my code if someone needs it:

local Players = script.Parent.Players -- here gets inserted the players names
local TeleportService = game:GetService("TeleportService")
local ID = "insert game id here"

for i,p in pairs(Players:GetChildren()) do
    spawn(function()
        print(i)
        TeleportService:Teleport(ID,game.Players[p.Name])
    end)
end

Answer this question