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 » Scripting Helpers
Home Search
 

Re: How do you do this?

Previous Thread :: Next Thread 
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
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
vortexyamum is not online. vortexyamum
Joined: 31 Aug 2011
Total Posts: 1979
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 is not online. 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 is not online. 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
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
15 Mar 2014 07:21 PM
There is a error
Report Abuse
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
15 Mar 2014 07:22 PM
it is function arguements near do
Report Abuse
trogyssy is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
15 Mar 2014 07:26 PM
trog, not to be picky, but, you forgot an end...
Report Abuse
Essentially is not online. Essentially
Joined: 06 Jun 2012
Total Posts: 30200
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
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
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
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
15 Mar 2014 07:29 PM
Wait what is this doing? Game.Players:GetChildren[i].Character:BreakJoints() Doesnt even work?
Report Abuse
trogyssy is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
15 Mar 2014 07:36 PM
It was this:
Game.Players:GetChildren()[i].Character:BreakJoints()

you forgot () at getchildern
Report Abuse
vortexyamum is not online. vortexyamum
Joined: 31 Aug 2011
Total Posts: 1979
15 Mar 2014 07:36 PM
And you can't test to see if your script works in a forum box.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
15 Mar 2014 07:38 PM
I spotted the error trog, no thanks? lol I'm kidding.
Report Abuse
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
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
Essentially is not online. Essentially
Joined: 06 Jun 2012
Total Posts: 30200
15 Mar 2014 07:40 PM
my script works perfectly.
Report Abuse
trogyssy is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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 is not online. 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
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
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
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
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 is not online. 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
jaymanser1999 is not online. jaymanser1999
Joined: 11 Dec 2010
Total Posts: 179
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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