kingzluke
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 4177 |
|
|
| 16 Mar 2012 06:04 PM |
If any leader stat goes below -10 it's suppose to kill the player.. but it doesn't.
game.Players.ChildAdded:connect(function(Incoming) while true do wait() if Incoming.leaderstats.Sleep.Value=<=-10 then pcall(function() Incoming.Character.Humanoid.Health=0 Incoming.leaderstates.Thirst.Value=0 Incoming.leaderstates.Sleep.Value=0 Incoming.leaderstates.Hunger.Value=0 end) end if Incoming.leaderstats.Hunger.Value=<=-10 then pcall(function() Incoming.Character.Humanoid.Health=0 Incoming.leaderstates.Thirst.Value=0 Incoming.leaderstates.Sleep.Value=0 Incoming.leaderstates.Hunger.Value=0 end) end if Incoming.leaderstats.Thirst.Value=<=-10 then pcall(function() Incoming.Character.Humanoid.Health=0 Incoming.leaderstates.Thirst.Value=0 Incoming.leaderstates.Sleep.Value=0 Incoming.leaderstates.Hunger.Value=0 end) end end end)
I edited it from another script I had which was if leaderstats reached over 100 the player dies |
|
|
| Report Abuse |
|
|
| |
|
kingzluke
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 4177 |
|
| |
|
kingzluke
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 4177 |
|
| |
|
| |
|
kingzluke
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 4177 |
|
|
| 16 Mar 2012 06:17 PM |
@Wood
tried it as thirst, didn't work qq |
|
|
| Report Abuse |
|
|
| |
|
kingzluke
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 4177 |
|
|
| 16 Mar 2012 06:20 PM |
@wood
I don't know what you're saying either. |
|
|
| Report Abuse |
|
|
| |
|
kingzluke
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 4177 |
|
|
| 16 Mar 2012 06:27 PM |
@Wood
I tried that along with different kill methods but still didn't work. Thanks anyways :) |
|
|
| Report Abuse |
|
|
| |
|
kingzluke
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 4177 |
|
|
| 16 Mar 2012 06:32 PM |
Nvm
I fixed it using my other script.
I removed the = and made it if it was -1 and now it kills them :D |
|
|
| Report Abuse |
|
|
|
| 16 Mar 2012 07:30 PM |
@Kingz, This is for a scoreboard right. |
|
|
| Report Abuse |
|
|
|
| 16 Mar 2012 07:31 PM |
Once it hits zero make it kill them, Make it on a loop so onc they die it restarts. Thank you, Alex. |
|
|
| Report Abuse |
|
|
kingzluke
|
  |
| Joined: 23 Mar 2009 |
| Total Posts: 4177 |
|
|
| 16 Mar 2012 07:33 PM |
@Silv3r
I have a script which resets stats on death. Seeing as the leaderstats start as 0 I made it so anything below 0 would kill you and then it resets so players can continue. |
|
|
| Report Abuse |
|
|