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

How can I CFrame players in different place everyone 300 seconds? [closed]

Asked by 7 years ago

So I tried to CFrame Players in different places before but they all the players teleports in the same place can anyone help me out? Like in Mad Games it teleports players in different places like in a room and one players teleport to a hallway so can anyone help me out?

Thanks to all the helpers!

Closed as Not Constructive by TheHospitalDev and OldPalHappy

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 7 years ago

What happens in mad games to my knowledge is that there are invisible parts around the map that the tp script marks as a spawn. Then the tp script gathers all the players and tps them all randomly to the spawns.

-- the spawns would be in here
local spawns = {workspace.Spawn1, workspace.Spawn2}

for i, v in pairs(game.Players:GetPlayers()) do
    v.Character.Torso.CFrame = (spawns[math.random(#spawns)]).CFrame*CFrame.new(0,3,0)
end


Ad