Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 17 Feb 2014 03:07 PM |
The script works with no errors in offline mode and in online mode but with only 1 player. Once there is more than 1 player, I get an error on line 11 "It is not a valid member of Player" What this script does (or what it's supposed to do) is select a random player from all the players in the server and teleport all the players except for the randomly selected one. I think there is a problem with distinguishing who is the reaper(random player)
while true do for i = 20, 0, -1 do wait(1) script.Parent.Text = i end pls = game.Players:players() reaper = game.Players:players()[math.random(1, #pls)] a = Instance.new("BoolValue", reaper) a.Name = "It" for i, v in pairs(game.Players:GetChildren()) do if v.It == nil then v.Character:MoveTo(Vector3.new(500, 5, 0)) elseif v.It ~= nil then end end reaper.It:Remove() script.Parent.Parent.Text1.Text = "Game in progress" script.Parent.Parent.Text2.Text = "Game ending in:"
for i = 60, 0, -1 do wait(1) script.Parent.Text = i end for i, v in pairs(game.Players:GetChildren()) do v.Character:MoveTo(Vector3.new(0, 5, 0)) end script.Parent.Parent.Text1.Text = "No game in progress" script.Parent.Parent.Text2.Text = "Time until next round:" end |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 17 Feb 2014 03:29 PM |
| I know it's a bit advanced but can anybody help? :/ |
|
|
| Report Abuse |
|
|
error9999
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1593 |
|
|
| 17 Feb 2014 03:31 PM |
line 6, :players()
I guess that's wrong. |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
| |
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 17 Feb 2014 03:33 PM |
| its the same as using GetPlayers |
|
|
| Report Abuse |
|
|
error9999
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1593 |
|
|
| 17 Feb 2014 03:34 PM |
line 11, if v:FindFirstChild("It") == nill then |
|
|
| Report Abuse |
|
|
error9999
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1593 |
|
|
| 17 Feb 2014 03:38 PM |
| btw, next time, write your own script, not just copy it. |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 17 Feb 2014 03:55 PM |
| error, i wrote this whole thing myself thank you very much and i fixed it myself so thanks but no thanks |
|
|
| Report Abuse |
|
|