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

How to TP a group to private server ?

Asked by 4 years ago

I want to teleport players who touched a part but it teleports each to a private server. This is my script

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")
local DSS = game:GetService("DataStoreService")
local DS = DSS:GetGlobalDataStore()
local ds = {}


function Joined(plr)
    table.insert(ds,plr)
    for k,v in pairs(ds) do     
        TP(v)
    end
end

function TP(v)
    local code = TS:ReserveServer(4696584041)
    TS:TeleportToPrivateServer(4696584041,code,{v})

end



local part = game.Workspace.Teleport
part.Touched:Connect(function(hit)
    local check = hit.Parent:FindFirstChild("Humanoid")
    if check ~= nil then
        local plr = game.Players:GetPlayerFromCharacter(check.Parent)   
        Joined(plr)
    end
end)
0
What do you mean by a private server? Do you mean a server with multiple spots for players in the same game, or a server with one player in a different game? Please specify. Maxis_s 97 — 4y
0
I want to create a story game, i want to tp multiple players to a place in that game tieuvuong07 -8 — 4y

Answer this question