JoelC2Join Date: 2010-05-28 Post Count: 344 |
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? |
|
UFAIL2Join Date: 2010-08-14 Post Count: 6905 |
Please, double check your spelling and try to use grammar, I can't read that. |
|
|
JoelC2Join Date: 2010-05-28 Post Count: 344 |
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() |
|
|
UFAIL2Join Date: 2010-08-14 Post Count: 6905 |
Um, you could just parent up until the Player, then access the Character. |
|
JoelC2Join Date: 2010-05-28 Post Count: 344 |
Gui's go into the "Players Service" not "Workspace" |
|
UFAIL2Join Date: 2010-08-14 Post Count: 6905 |
Parent up the the Player, then use this:
Player.Character |
|
|
|
JoelC2Join Date: 2010-05-28 Post Count: 344 |
OHH i didnt understand wat u meant bfore |
|
JoelC2Join Date: 2010-05-28 Post Count: 344 |
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
______________________________________________________________ |
|
UFAIL2Join Date: 2010-08-14 Post Count: 6905 |
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 |
|