Jro1311
|
  |
| Joined: 01 Jun 2013 |
| Total Posts: 3328 |
|
|
| 25 Jul 2013 06:32 AM |
I made a thread before on this subject but nobody got it right so I'm just going to give out all the codes so that you can figure out how to make players respawn at the end of each round.
while true do a = Instance.new("Hint") -- This inserts a Text Bar.. a.Parent = game.Workspace -- In Workspace a.Text = "Choosing Map 'Urban' " -- The Text in the bar wait(1) -- wait 1 second a.Text = "Choosing Map 'Lava' " wait(1) a.Text = "Choosing Map 'Park' " wait(1) a.Text = "Choosing Map" wait(3)
lol = (math.random(1,5)) -- it will chose a number between 1-5 if lol == 1 then -- If it chose 1 then b = Instance.new("Message") -- Make a message b.Parent = game.Workspace -- In Workspace b.Text = " Urban Map Chosen!" -- Message text.. a.Text = "Loading Map 'Urban' " -- Hint Text wait(2) -- wait 2 seconds. map = game.Lighting.Map1:Clone() -- Okay so in your lighting thingy in explorer put in a map. Call it "Map1" map.Parent = game.Workspace map.Name = "Map" map:MakeJoints() a.Text = "Begin!" target = Vector3.new(74.4, 3.9, -42.5) --Ok so put your co-ordinates for where you want your players to go.. for i, v in pairs(game.Players:GetChildren()) do v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 5, 0)) --add an offset of 5 for each character end wait(3) a:Remove() b:Remove() end if lol == 2 then b = Instance.new("Message") b.Parent = game.Workspace b.Text = " Lava Map Chosen! " a.Text = "Loading Map 'Lava' " wait(2) map = game.Lighting.Map2:Clone() -- Put anouther map in Lighting call it Map2 map.Parent = game.Workspace map.Name = "Map" map:MakeJoints() a.Text = "Last Man Standing Wins!" target = Vector3.new(74.4, 3.9, -42.5) --Ok so put your co-ordinates for where you want your players to go.. for i, v in pairs(game.Players:GetChildren()) do v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 5, 0)) end wait(3) a:Remove() b:Remove() end if lol == 3 then b = Instance.new("Message") b.Parent = game.Workspace b.Text = " Park Map Chosen! " a.Text = "Loading Map 'Park' " wait(2) map = game.Lighting.Map3:Clone() -- Make map Map3 and put it in lighting map.Parent = game.Workspace map.Name = "Map" map:MakeJoints() a.Text = "Last Man Standing Wins!" target = Vector3.new(74.4, 3.9, -42.5) --Ok so put your co-ordinates for where you want your players to go.. for i, v in pairs(game.Players:GetChildren()) do v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 5, 0)) end wait(3) a:Remove() b:Remove() end if lol == 4 then b = Instance.new("Message") b.Parent = game.Workspace b.Text = "MAP 4 CHOSEN!" a.Text = "Loading MAP 4" wait(2) map = game.Lighting.Map4:Clone() -- Make Map4 and put it in lighting map.Parent = game.Workspace map.Name = "Map" map:MakeJoints() a.Text = "Last Man Standing Wins!" target = Vector3.new(74.4, 3.9, -42.5) --Ok so put your co-ordinates for where you want your players to go.. for i, v in pairs(game.Players:GetChildren()) do v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 5, 0)) end wait(3) a:Remove() b:Remove() end if lol == 5 then b = Instance.new("Message") b.Parent = game.Workspace b.Text = "MAP 5 CHOSEN!" a.Text = "Loading MAP 5" wait(2) map = game.Lighting.Map5:Clone() -- And Map5 map.Parent = game.Workspace map.Name = "Map" map:MakeJoints() a.Text = "Last Man Standing Wins!" target = Vector3.new(74.4, 3.9, -42.5) --Ok so put your co-ordinates for where you want your players to go.. for i, v in pairs(game.Players:GetChildren()) do v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 5, 0)) end wait(3) a:Remove() b:Remove() end wait(10) -- Change this to how long you want your round to be.. c = Instance.new("Message") c.Parent = game.Workspace c.Text = "Round Over!" -- END! wait(3) c:Remove() game.Workspace.Map:Remove() end |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2013 06:34 AM |
| You can respawn player by using the LoadCharacter member function of Player |
|
|
| Report Abuse |
|
|
Jro1311
|
  |
| Joined: 01 Jun 2013 |
| Total Posts: 3328 |
|
|
| 25 Jul 2013 06:34 AM |
Okay, but I keep trying everything and it's not working... Maybe I'm putting it in the wrong spot maybe?
~The Truth Lies Within My Post~ |
|
|
| Report Abuse |
|
|
| |
|
Jro1311
|
  |
| Joined: 01 Jun 2013 |
| Total Posts: 3328 |
|
|
| 25 Jul 2013 06:37 AM |
1.i=game.workspace:GetAllChildren() if i.Classname = model then i.Humanoid.Health = 0 end
2.for i,v in pairs(game.Players:GetPlayers())do v.Character.Humanoid.Health = 0 end
3.wait(0)(game.Players:GetPlayers())do v.Character.Humanoid.Health = 0 end
~The Truth Lies Within My Post~ |
|
|
| Report Abuse |
|
|
Jro1311
|
  |
| Joined: 01 Jun 2013 |
| Total Posts: 3328 |
|
|
| 25 Jul 2013 06:41 AM |
Anybody? :l
~The Truth Lies Within My Post~ |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2013 06:42 AM |
Your second attempt should have worked, but I can improve it for you:
for i,v in pairs(game.Players:GetPlayers())do v:LoadCharacter() end |
|
|
| Report Abuse |
|
|
Jro1311
|
  |
| Joined: 01 Jun 2013 |
| Total Posts: 3328 |
|
|
| 25 Jul 2013 06:47 AM |
Where would I put it? I put it at the end but every time nothing happens. Check the script codes below and see where to put it.
~The Truth Lies Within My Post~ |
|
|
| Report Abuse |
|
|
Jro1311
|
  |
| Joined: 01 Jun 2013 |
| Total Posts: 3328 |
|
|
| 25 Jul 2013 06:49 AM |
I mean above *facedesk*
~The Truth Lies Within My Post~ |
|
|
| Report Abuse |
|
|
Jro1311
|
  |
| Joined: 01 Jun 2013 |
| Total Posts: 3328 |
|
|
| 25 Jul 2013 06:52 AM |
Help?
~The Truth Lies Within My Post~ |
|
|
| Report Abuse |
|
|