twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 22 May 2014 10:56 AM |
Character doesn't load instantly. Wait for it to load.
Also your loop will never stop damaging your player once it starts. |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 22 May 2014 10:56 AM |
| do FreeFalling event. FallingDown is for when you get tripped. |
|
|
| Report Abuse |
|
|
twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 22 May 2014 10:59 AM |
game.Players.PlayerAdded:connect(function(p) repeat wait until p.Character p.Character.Humanoid.FallingDown:connect(function() while true do wait(1) p.Character.Humanoid.Health:TakeDamage(3) end end) end) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 22 May 2014 10:59 AM |
Keep checking if the character exists until it exists.
http://wiki.roblox.com/index.php?title=Loops#Repeat |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 22 May 2014 10:59 AM |
| ignore me actually sorry lol |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 22 May 2014 10:59 AM |
| Way to go smiley599. You denied him the chance to learn. |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 22 May 2014 11:02 AM |
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) p.Character.Humanoid.FreeFalling:connect(function() while true do p.Character.Humanoid.Health:TakeDamage(3) end end) end) end) |
|
|
| Report Abuse |
|
|
twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 May 2014 11:04 AM |
Do not hse the repeat wait() until one that smiley posted Use CharacterAdded |
|
|
| Report Abuse |
|
|
twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 22 May 2014 11:08 AM |
| yeah i said ignore me because i saw there was no character added and i didnt want to do #lazy |
|
|
| Report Abuse |
|
|
twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 May 2014 11:15 AM |
Also OP You could clean your script up a little, example while true do wait(1) --whatever you did, Im on a iphone and so can't look at it end
while loops take a condition, a condition will pass if the value is anything other than nil, or false
while 1 do wait(1) end Will run forever
wait(1) returns the amount of time it waited, a number is not false or nil so while wait(1) do --stff end |
|
|
| Report Abuse |
|
|
twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 May 2014 11:35 AM |
| Take away the .Health and call take damage on the humanoid |
|
|
| Report Abuse |
|
|
twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 22 May 2014 11:39 AM |
| Are you using a while loop without a wait? |
|
|
| Report Abuse |
|
|
twerq
|
  |
| Joined: 08 Jun 2013 |
| Total Posts: 1057 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 May 2014 12:08 PM |
| If you are gonna break the while loop after it runs once you don't even need the while loop |
|
|
| Report Abuse |
|
|