Tipin
|
  |
| Joined: 10 Jan 2009 |
| Total Posts: 4547 |
|
|
| 25 Sep 2011 09:08 PM |
| Hello, I'm makeing a sword fighting game and I need a small added part to my script witch is after it say's "Game over!" I need the part where it kills every one! only that part once again only need a script that makes every one die. thank you! |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 25 Sep 2011 09:16 PM |
| I would use a generic loop. |
|
|
| Report Abuse |
|
|
sckum555
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 6576 |
|
|
| 25 Sep 2011 09:16 PM |
http://www.roblox.com/My/Groups.aspx?gid=399339
Could probably help you.
.:/!#sckum#!\:. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 09:17 PM |
for _,v in pairs(game.Players:GetChildren()) do if v and v:IsA("Player") then v.Character:BreakJoints() end end |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 25 Sep 2011 09:20 PM |
@Skcum
Fail just a fail. Five members? lol xD |
|
|
| Report Abuse |
|
|
sckum555
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 6576 |
|
|
| 25 Sep 2011 09:21 PM |
Bro, I just started today, and we have 7 members. 5 normal, 1 admin, and me. If you joined we would have eight 8D
.:/!#sckum#!\:. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 25 Sep 2011 09:35 PM |
| Dude go to scripting helpers. MAJOR SCRIPTERS ARE THERE!!!!! And they actually teach you to script. |
|
|
| Report Abuse |
|
|
Tipin
|
  |
| Joined: 10 Jan 2009 |
| Total Posts: 4547 |
|
|
| 25 Sep 2011 09:39 PM |
| @King, does that work for what I'm looking for? I never seen that type of script typed like that with the "paris" and "V's" you put in it. I'll try but for a better understanding I want a script like commands "kill/all" but not commands I want this script to kill everyone in game that's it. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 25 Sep 2011 09:41 PM |
for _,v in pairs(game.Players:GetChildren()) do if v.Character then v.Character:BreakJoints() end end
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 09:43 PM |
| @nate Woulden't it be easier just to make there health 0 XD |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 25 Sep 2011 09:43 PM |
Something like this?
game.Players.Tipin.Chatted:connect(function(msg) if string.sub(msg,1,3): == "go/" then local m = Instance.new("Message",Workspace) m.Text = "Game over!" for i,v in pairs(game.Players:GetChildren()) do v.Character:BreakJoints() end wait(1.5) m:remove() end end) |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 25 Sep 2011 09:49 PM |
@Josh
Trust me, he knows what he's doing. |
|
|
| Report Abuse |
|
|
Tipin
|
  |
| Joined: 10 Jan 2009 |
| Total Posts: 4547 |
|
|
| 25 Sep 2011 09:50 PM |
Not just me the whole game! for example at the end of every minigame or sword fighting tourn. after it says game over every one dies and respawns i only need the "every one dies part" I dont know but i try'd this and it was a fail momment!
game.players.health=(0)
did not work...
I want every one in my game to die and includeing me after the game/round is over. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 09:52 PM |
| Oh I know that nate is a very respected scripter on here.I was just wondering why he broke joints,Instead of doing it the easy way and making the players health 0,It kinda bogled my mind.XD |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 25 Sep 2011 09:54 PM |
function gameover() local msg = Instance.new("Message",Workspace) msg.Text = "Game Over!" for i,v in pairs(game.Players:GetChildren()) do v.Character:BreakJoints() end wait(1.5) msg:Remove() end
Put this at the top of your current script.
At the point in your current script, where the game is over, put the following line: gameover() |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 25 Sep 2011 09:55 PM |
@josh
You are telling me that..
v.Character.Humanoid.Health = 0
is shorter than
v.Character:BreakJoints()
I don't think so. :P |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 09:56 PM |
| No but i'm pretty sure a non scripter would understand humanoid health = 0 better then break joints therfor it's more advanced then humanoid health = 0 |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 25 Sep 2011 09:59 PM |
Method vs. Knowledge of Humanoid
It really depends on what the person did, before asking. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 10:01 PM |
| grimm343 Just saying i'm not argueing cause i know the computer dosen't tell the tone of voice.I just thought a non scripter would understand it better. |
|
|
| Report Abuse |
|
|
Tipin
|
  |
| Joined: 10 Jan 2009 |
| Total Posts: 4547 |
|
|
| 25 Sep 2011 10:03 PM |
It worked this is my script so far! :) "BUT ONE MORE QUESTION WILL IT REPEAT ITSELF?! over and over again?"
--Made by Tipin
wait(2)
local msg = Instance.new("Message")
msg.Name = "Message" msg.Parent = game.Workspace msg.Text = "Ending in 4" wait(1) msg:Remove()
wait(1)
local msg = Instance.new("Message")
msg.Name = "Message" msg.Parent = game.Workspace msg.Text = "3" wait(1) msg:Remove()
wait(1)
local msg = Instance.new("Message")
msg.Name = "Message" msg.Parent = game.Workspace msg.Text = "2" wait(1) msg:Remove()
wait(1)
local msg = Instance.new("Message")
msg.Name = "Message" msg.Parent = game.Workspace msg.Text = "1" wait(1) msg:Remove()
wait(1)
local msg = Instance.new("Message")
msg.Name = "Message" msg.Parent = game.Workspace msg.Text = "Game Over!" wait(4) msg:Remove() for _,v in pairs(game.Players:GetChildren()) do if v.Character then v.Character:BreakJoints() end end
|
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 10:04 PM |
I DIDN'T REALLY READ ALOT OF YOU'R SCRIPT BUT IT DOSEN'T LOOK LIKE YOU PUT A FUNCTION, or even a while true do i think you need one of those for it to work.
btw sorry about the caps. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 25 Sep 2011 10:07 PM |
local a = 4 local msg = Instance.new("Message",Workspace) for i = 1, 4 do msg.Text = "Game ending in " ..a " seconds!" a = a - 1 wait(1) end msg.Text = "Game Over!" for _,v in pairs(game.Players:GetChildren()) do if v.Character then v.Character:BreakJoints() end end wait(1.5) msg:Remove() |
|
|
| Report Abuse |
|
|
Tipin
|
  |
| Joined: 10 Jan 2009 |
| Total Posts: 4547 |
|
|
| 25 Sep 2011 10:08 PM |
| No problem but for my sword fighting game do you know anything about how I can announce my winner by highest kills and lowest deaths? or by highest kills and deaths doesn't mean anything.. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 25 Sep 2011 10:08 PM |
If you plan on using this more than once..
Under (new line) 'msg:Remove()' put a = 4 |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2011 10:10 PM |
The Kill Everyone Line:
local p = game.Players:GetPlayers() for i=1,#p do p[i].Character:BreakJoints() end
|
|
|
| Report Abuse |
|
|