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

Teleport player when server have enough people?

Asked by 4 years ago

I am trying to teleport player when the server have enough people , just like some minigame game !

0
Maybe you would like to approve my answer? LinavolicaDev 570 — 4y
1
Here you go! shime1122 6 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
local tpCF = CFrame.new(your place);
local enough = 10;
local Tped = false
game.Players.ChildAdded:Connect(function()
    if #game.Players:GetChildren() >= enough then
        if Tped == false then
        Tped = true
        for i,p in pairs(game.Players:GetChildren()) do

            repeat wait() until p.Character
            p.Character:WaitForChild("HumanoidRootPart").CFrame = tpCF
        end
        end
    end
end)

tpCF is the CFrame you are gonna teleport players. enough is the smallest amount of players to be teleported.

0
Thanks pal. shime1122 6 — 4y
Ad

Answer this question