generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Please help me with my script.

Previous Thread :: Next Thread 
Bccr is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image