|
| 15 Mar 2014 07:12 PM |
| I am creating a game a racing game and when someone wins i want all the players to die or respond i have everything ready BUTT that... |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:13 PM |
| You could make an ontouched script and simply make the script kill all players after the ontouched activates. |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 15 Mar 2014 07:14 PM |
function kill() for i=1, #Game.Players:GetChildren do Game.Players:GetChildren[i].Character:BreakJoints() end
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 15 Mar 2014 07:15 PM |
Put that bit at the very beginning. When the time comes to kill, put
kill()
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Mar 2014 07:22 PM |
| it is function arguements near do |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 15 Mar 2014 07:24 PM |
Forgot the () after GetChildren
function kill() for i=1, #Game.Players:GetChildren() do Game.Players:GetChildren[i].Character:BreakJoints() end
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:26 PM |
| trog, not to be picky, but, you forgot an end... |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:26 PM |
script.Parent.Touched:connect(function(Player)
for __,v in pairs(game:service'Players':GetPlayers()) do
v:LoadCharacter();
end;
end); |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:27 PM |
| Aw thanks i now how to script but i never learned fro loops lel i should prob start learning them |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:29 PM |
| Wait what is this doing? Game.Players:GetChildren[i].Character:BreakJoints() Doesnt even work? |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 15 Mar 2014 07:32 PM |
yes. Add an extra end at the end and it'll work. It's harder to write code in the forum box than it is in studio, so I make mistakes occasionally, and I'm overtired. Sorry for giving you a script that errors.
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:36 PM |
Here...
function KillThoseNoobs() local ps = game.Players local noobs = ps:GetChildren() for i = 1,#noobs do local noob = ps[i] local char = noob.Character char.Humanoid.Health = 0 end end
Go crazy... |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:36 PM |
It was this: Game.Players:GetChildren()[i].Character:BreakJoints() you forgot () at getchildern
|
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:36 PM |
| And you can't test to see if your script works in a forum box. |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:38 PM |
| I spotted the error trog, no thanks? lol I'm kidding. |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:38 PM |
| again lel it alright i had to write a forum today cause i could not get a bool value to work and all i forgot was the .Value we all make mistakes |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:40 PM |
| my script works perfectly. |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 15 Mar 2014 07:41 PM |
Lol thanks guys XD
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:43 PM |
| Even kohl made a mistake, his :lsplr plr code command in his admin don't work, so I wrote a global function to do it myself :P |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 15 Mar 2014 07:45 PM |
lol niiiiiice B)
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:53 PM |
| nice also your script didnt work for the thing i needed it to do it was not a ontouch thing is is my own system i made |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 07:55 PM |
| Oh and why you guys are here http://www.roblox.com/Forum/ShowPost.aspx?PostID=128124361 |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 15 Mar 2014 08:00 PM |
script.Parent.Touched:connect(function kill() end)
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
|
| 15 Mar 2014 08:02 PM |
| No your script was find i was talking to the dude who said his works fine. I have a my own system i made nit onTouch |
|
|
| Report Abuse |
|
|