TheProM
|
  |
| Joined: 27 Mar 2013 |
| Total Posts: 436 |
|
|
| 17 Jul 2014 03:32 AM |
while true do wait() for i,v in pairs(game.players:GetChildren()) do v.Character.Humanoid.swimming:connect(function(swim) if swim then v.Character.Humanoid:TakeDamage(10) wait(2) end end end) end |
|
|
| Report Abuse |
|
|
Fatalizer
|
  |
| Joined: 28 Aug 2011 |
| Total Posts: 1520 |
|
|
| 17 Jul 2014 03:41 AM |
while true do wait(1/30) for i,v in pairs(game.Players:GetChildren()) do v.Character.Humanoid.swimming:connect(function(s) if s then v.Character.Humanoid:TakeDamage(10) wait(2) end end) end end |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:14 AM |
| That while loop is in the wrong place. It will quickly deal thousands of damage when they start swimming. |
|
|
| Report Abuse |
|
|
cornytime
|
  |
| Joined: 07 Feb 2013 |
| Total Posts: 3213 |
|
|
| 17 Jul 2014 07:12 AM |
| nah there's a 2 seconds wait at the end tho |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 07:13 AM |
| Do you not know how events work? |
|
|
| Report Abuse |
|
|
cornytime
|
  |
| Joined: 07 Feb 2013 |
| Total Posts: 3213 |
|
|
| 17 Jul 2014 07:17 AM |
game.Players.PlayerAdded:connect(function(player) player.Character.Humanoid.swimming:connect(function(swim) while swim do player.Character.Humanoid:TakeDamage(10) wait(2) end) end) end --- it can be this right? but well he decided that so |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 08:13 AM |
Nop 'swim' would return the speed. |
|
|
| Report Abuse |
|
|