|
Moral of everything: dis dont work fix pls
if game.Workspace.player.Character.Humanoid == 0 then
game.Workspace.player.Character.Humanoid:remove()
end |
|
|
That works really well, actually, assuming Character.Humanoid is a property which is a number value... |
|
|
@jardod
But it doesn't work. Character.Humanoid is the players humanoid. |
|
MrEpic534Join Date: 2012-05-12 Post Count: 1349 |
in a local script pls
player = game.Players.LocalPlayer
if game.Workspace.player.Character.Humanoid.Health == 0 then
game.Workspace.player.Character:remove()
end
if it doesnt work please tell me and with a output please :)
|
|
|
@op
POP QUIZ! what is humanoid?
A. An object inside character
B. A table
C. A number
D. A function |
|
|
@Teh
I would say A, but I have a feeling this is only leading to a insult. |
|
|
@MrEpic
Doesn't work and there is no output. |
|
|
It is a logic error, if there is no output.
Well Humanoid is a Humanoid, so Humanoid can't equal 0, since Humanoid is a userdata. |
|
MrEpic534Join Date: 2012-05-12 Post Count: 1349 |
player = game.Players.LocalPlayer
if player.Character.Humanoid.Health == 0 then
game.Workspace.player.Character:remove()
end
try ow |
|
RengorJoin Date: 2011-03-04 Post Count: 358 |
instead of
game.Workspace.player.Character:remove()
use game.Workspace.player.Character:Destroy() |
|
eLunateJoin Date: 2014-07-29 Post Count: 13268 |
In Roblox, a Humanoid is a userdata value linked to a class back in the C wrapper. This particular class inherits from Instance, and is designed to behave just like a table in order to give it hierarchy behaviour.
Do I win? |
|
ByDefaultJoin Date: 2014-07-25 Post Count: 4022 |
none of your guys' code will work, here:
local plr = game.Players.LocalPlayer
local h = plr.Character:WaitForChild("Humanoid")
h.Changed:connect(function(s)
if h.Health <= 0 then
plr.Character:remove()
end
end)
|
|
anaIyzeJoin Date: 2014-05-29 Post Count: 2048 |
lolololol
lol=game.Players.localPlayer;
lol.Character.Humanoid.Died:connect(function()
if(lol.Character~=nil and lol.Character.Humanoid.Health==0)then
lol.Character.Humanoid:remove'';
end;end); |
|