JoelC2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 344 |
|
|
| 30 Aug 2011 03:18 PM |
the value of a gui in my game = 0 i want the person who has the gui in their guis to die but idk how to identify the oerson to acsess their humanoid ino that part of the script wud be like this....
--------------- if CurrentValue.Value = 0 then PERSON.Humanpid.Health = 0 ----------------
so idk how to find the exact person to kill :l kinda bad description but its for a hunger game gui. Any help? |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 30 Aug 2011 03:20 PM |
| Please, double check your spelling and try to use grammar, I can't read that. |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 03:21 PM |
@ UFAIL2,
ikr,
if CurrentValue.Value == 0 then PERSON.Humanpid.Health = 0 end
|
|
|
| Report Abuse |
|
|
JoelC2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 344 |
|
|
| 30 Aug 2011 03:21 PM |
when the value of a hunger game like the hunger,thirst,sleep go to 0 then i want the oerson to die of hunger thirst or sleep
i just dont know how to indentify the person to acsess their humanoid or break:joint() |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 03:23 PM |
localize it,
local Player = game.Players.LocalPlayer _G["Character"] = Player.Character -- blah blah blah |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 30 Aug 2011 03:24 PM |
| Um, you could just parent up until the Player, then access the Character. |
|
|
| Report Abuse |
|
|
JoelC2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 344 |
|
|
| 30 Aug 2011 03:28 PM |
| Gui's go into the "Players Service" not "Workspace" |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 30 Aug 2011 03:29 PM |
Parent up the the Player, then use this:
Player.Character |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 03:29 PM |
Did you even read his post?
"Um, you could just parent up until the Player, then access the Character." ______ __ ____ ___ ______ ____ ______ ___ _________ |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 03:30 PM |
That failed D:
~Stupid floodcheck~ |
|
|
| Report Abuse |
|
|
JoelC2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 344 |
|
|
| 30 Aug 2011 03:30 PM |
| OHH i didnt understand wat u meant bfore |
|
|
| Report Abuse |
|
|
JoelC2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 344 |
|
|
| 30 Aug 2011 03:37 PM |
This may have some fails but is this it?
_____________________________________________________________ local Player = script.Parent.Parent.Parent.Parent.Character local CurrentValue = script.Parent.CurrentValue
if CurrentValue.Value == 0 then game.Workspace.Player.Humanoid.Health = 0 end ______________________________________________________________ |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 30 Aug 2011 04:04 PM |
Always include Output. Why did you define the Player, but not use it?
local Player = script.Parent.Parent.Parent.Parent.Character local CurrentValue = script.Parent.CurrentValue
if CurrentValue.Value == 0 then Player.Humanoid.Health = 0 end |
|
|
| Report Abuse |
|
|