thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 05 Oct 2013 11:02 AM |
It only kills you in solo mode, it don't work on play mode. As you can see when the message is 0 it should kill.
local h = Instance.new("Hint", workspace); local m = Instance.new("Message", workspace);
local changeHint = coroutine.wrap(function() for i = 60, 0, -1 do wait(0.5) h.Text = i
end end) local changeMessage = coroutine.wrap(function() local Player = game.Players:GetChildren() for i = 60, 0, -1 do wait(1) m.Text = i if i == 0 then for x = 1,#Player,1 do Player[x].Character.Humanoid.Health = 0 end
end
end end)
changeHint() changeMessage() |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
| |
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
| |
|
Dexatio
|
  |
| Joined: 08 Oct 2011 |
| Total Posts: 260 |
|
|
| 05 Oct 2013 11:10 AM |
Is it in a local script?
- Dex |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 05 Oct 2013 11:11 AM |
| No, it's not in a localscript! |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
| |
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
| |
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
| |
|
|
| 05 Oct 2013 11:41 AM |
Let me redo that. Think this should work, didn't test it though.
local h = Instance.new("Hint", game.Workspace) local m = Instance.new("Message", game.Workspace)
coroutine.resume(coroutine.create(function() for i = 60,1,-1 do wait(1) h.Text = i end end))
for i = 1,60 do wait(1) m.Text = i end
for _,v in pairs game.Players:GetChildren() do v.Character:BreakJoints() end
-Believe and you will achieve- |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
| |
|
|
| 05 Oct 2013 12:49 PM |
So you expect me to magically know what was wrong with it?
-Believe and you will achieve- |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 05 Oct 2013 12:54 PM |
| I didn't ask you, think before you talk. |
|
|
| Report Abuse |
|
|
|
| 05 Oct 2013 12:56 PM |
Good, because I found what was wrong with it.
local h = Instance.new("Hint", game.Workspace) local m = Instance.new("Message", game.Workspace)
coroutine.resume(coroutine.create(function() for i = 60,1,-1 do wait(1) h.Text = i end end))
for i = 1,60 do wait(1) m.Text = i end
for _,v in pairs (game.Players:GetChildren()) do v.Character:BreakJoints() end
-Believe and you will achieve- |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 05 Oct 2013 12:59 PM |
| Why would you use coroutine.resume? instead of just doing what I did? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 05 Oct 2013 01:00 PM |
local h = Instance.new("Hint", game.Workspace) local m = Instance.new("Message", game.Workspace)
for i = 60,1,-1 do wait(1) h.Text = i m.Text = i end
for _,v in pairs (game.Players:GetChildren()) do v.Character:BreakJoints() end
|
|
|
| Report Abuse |
|
|
|
| 05 Oct 2013 01:07 PM |
Because one counts up and the other goes down? Didn't the OP use a coroutine anyway. Aren't you the OP?
-Believe and you will achieve- |
|
|
| Report Abuse |
|
|