Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

(Repost, old wasn't answered) Why isn't my humanoid acting right?

Asked by 4 years ago

I have tried using WaitForChild and Variables to refer to my Humanoid, it is being found, it can be printed and can have values read. The thing is: Humanoid:ChangeState() and changing health with Humanoid:TakeDamage() wont do anything.

Here's a snippet of my revival code.

function ReviveModule.Revive(Character)
    local Humanoid = Character.Humanoid
    Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
    for i=Humanoid.Health,Humanoid.MaxHealth,1 do
        wait()
        Humanoid:TakeDamage(-1)
    end
    print(Humanoid.Name.. " revived successfully!")
end

I've tried it with a LocalScript before (exact same method) and it works as expected. Is it something to do with it not being local?

EDIT: Testing with a WaitForChild() instead of indexing the humanoid directly also does not work It still prints the "Humanoid revived successfully!" message.

Here is a video of what happens.

Here

0
Once a humanoid dies you cannot "revive" it without respawning the character altogether Amiaa16 3227 — 4y
0
^ This doesn''t make sense, check my much simpler demo which uses all LocalScripts. https://web.roblox.com/games/5247564869/Revive evanultra01 38 — 4y
1
It is completely impossible to revive a humanoid after its state is "Dead". There is absolutely no way to do what you claim to have done. SteamG00B 1633 — 4y
0
Well, what is the argument "character" defined as? PrismaticFruits 842 — 4y
View all comments (4 more)
0
character is obviously a character as he is referencing the character's humanoid, but the problem remains the same. Its impossible to revive a dead humanoid. SteamG00B 1633 — 4y
0
The character is assumed to be a character evanultra01 38 — 4y
0
Accidentally posted before i could write my comment ^ The character is assumed to be a character model. evanultra01 38 — 4y
0
I will try to make the clientside change it like my original demo. I will get back on that (since i’m going away from home for a few hours) evanultra01 38 — 4y

Answer this question