y1p
|
  |
| Joined: 05 May 2013 |
| Total Posts: 350 |
|
|
| 20 Feb 2016 06:43 PM |
| When a player joins the game they have a value within them called Hunger. Not their workspace player but the other one in the "Players" child under game. I need a simple script that will kill them if its value reaches 0. |
|
|
| Report Abuse |
|
|
y1p
|
  |
| Joined: 05 May 2013 |
| Total Posts: 350 |
|
|
| 20 Feb 2016 06:45 PM |
| My bad i meant zero in the title not one. |
|
|
| Report Abuse |
|
|
y1p
|
  |
| Joined: 05 May 2013 |
| Total Posts: 350 |
|
| |
|
Fantasy
|
  |
| Joined: 25 Oct 2007 |
| Total Posts: 43 |
|
|
| 20 Feb 2016 06:52 PM |
This is just a guess but something like this. (I am new to scripting) and I don't know where Hunger is located.
while true do if game.Players.LocalPlayer.Character.Hunger.Value <= 0 then game.Players.LocalPlayer.Character.Humanoid.Health = 0 wait() end end |
|
|
| Report Abuse |
|
|
y1p
|
  |
| Joined: 05 May 2013 |
| Total Posts: 350 |
|
| |
|
Voidion
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 2668 |
|
|
| 20 Feb 2016 07:08 PM |
wait()
local Player = game.Players.LocalPlayer local Hunger = Player.Character:FindFirstChild("Hunger")
Hunger.Changed:connect(function() if Hunger.Value == 0 then Player.Character:BreakJoints() end end) |
|
|
| Report Abuse |
|
|
DevAlton
|
  |
| Joined: 08 Dec 2014 |
| Total Posts: 406 |
|
| |
|
y1p
|
  |
| Joined: 05 May 2013 |
| Total Posts: 350 |
|
| |
|
y1p
|
  |
| Joined: 05 May 2013 |
| Total Posts: 350 |
|
| |
|