Bccr
|
  |
| Joined: 06 May 2012 |
| Total Posts: 1 |
|
|
| 31 Dec 2015 03:24 PM |
I Don't know how to fix it, make all players teleport to a random spawn.
game.Players.PlayerAdded:connect(function(plr) local Stats = Instance.new("IntValue", plr) Stats.Name = "leaderstats" local Manie = Instance.new("IntValue", plr.leaderstats) Manie.Name = "Manie" Manie.Value = 10 local IsDead = Instance.new("BoolValue", plr) IsDead.Name = "IsDead" IsDead.Value = false
plr.CharacterAdded:connect(function(char) IsDead.Value = false local humanoid = char:WaitForChild("Humanoid") humanoid.Died:connect(function() IsDead.Value = true end) end) end)
local maps = game.ReplicatedStorage.Maps:GetChildren() local map = maps[1] local map2 = maps[2]
while wait(3) do if game.Players.NumPlayers >= 1 then maps[math.random(1,#maps)]:Clone().Parent = game.Workspace wait(1) for i,v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(math.random(1,#map.Spawns,map2.Spawns)) end elseif game.Players.NumPlayers < 2 then print("Not enough players") end end |
|
|
| Report Abuse |
|