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

Help with getting all player?

Asked by
FiredDusk 1466 Moderation Voter
8 years ago

I want where it says "Player.Character:MoveTo(Vector3.new(-504.2, -9.209, 34))" to get everyone in players and move them to that position.

print"PreyStar's Minigame, why are you looking at console, buddy?"
game.Players.PlayerAdded:connect(function(Player)



while true do
    wait(.1)

    local Timer = Player.PlayerGui.TimerGui.Frame
    local map = game.Lighting.Map1:Clone()

    if Timer.Visible == false then
        wait(1)
    Timer.Visible = true
for i = 10,1,-1 do  Timer.TextLabel.Text = ("Game starts in: "..i) wait(1) end
    Timer.Visible = false




    map.Parent = game.Workspace
    Player.Character:MoveTo(Vector3.new(-504.2, -9.209, 34))

    Timer.Visible = true
for i = 10,1,-1 do Timer.TextLabel.Text = ("Game ends in: "..i) wait(1) end
    Timer.Visible = false


    game.Lighting:FindFirstChild("Map1"):Clone()

    Player.Character:MoveTo(Vector3.new(-484.898, -9.4, -73.189))
    map.Parent = game.Lighting

        end
    end
end)

1 answer

Log in to vote
1
Answered by 8 years ago
local players =game.Players:GetPlayers()
for i,v in pairs (players) do
    v.Character:MoveTo(Vector3.new(-504.2, -9.209, 34))
end

Ad

Answer this question