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

How do i Teleport Each Player to a Different Spawn Point?

Asked by 5 years ago

Like in a Minigame, but i dont want the math.random, because have the chance to teleport 2 players in the same Spawn Point...

The Spawns are all together in a folder..

0
mash the player randomly and then for i, the spawns:getchildren() do for each spawn put the randomly diced player to that spawn sayer80 457 — 5y

1 answer

Log in to vote
0
Answered by
KDarren12 705 Donator Moderation Voter
5 years ago

This is easy.

Make a couple parts in the workspace. Then add them to a table and find a random one like so:

local spawns = {workspace:FindFirstChild('FirstSpawnName'), workspace:FindFirstChild('SecondSpawnName'), workspace:FindFirstChild('ThirdSpawnName')}

for i = 1,#spawns do
player.Character.Torso.CFrame = spawns[i]
end
Ad

Answer this question