You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want the player to not die or respawn when he haves 0 health
What is the issue? Include screenshots / videos if possible!
I don’t know how
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
search
kalabgs
(FartFella)
June 23, 2022, 7:15pm
#2
local function MakeInvincible(humanoid)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead,false)
humanoid.BreakJointsOnDeath = false
humanoid.HealthChanged:Connnect(function() humanoid.Health = humanoid.MaxHealth end)
end
Didn’t work the player can’t walk and I don’t want to change the player health I want to make it so the player can walk and not respawn even if he has 0 health
kalabgs
(FartFella)
June 23, 2022, 7:20pm
#4
it should be server sided, and i dont think you can have 0 health
I saw a post that had the script that doesn’t make you respawn and makes you able to walk when you have 0 health but I can’t find the post
And Yes it is server sided
kalabgs
(FartFella)
June 23, 2022, 7:24pm
#6
if you reseted on the client, it wouldnt work. Client humanoid states act different
No I didn’t reset I used a part that when touched it damages you
kalabgs
(FartFella)
June 23, 2022, 7:27pm
#8
Fixed it
local function MakeInvincible(humanoid : Humanoid)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead,false)
humanoid.BreakJointsOnDeath = false
humanoid.HealthChanged:Connect(function(hea)
task.wait()
humanoid.Health = 0.1
humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
end)
end
1 Like
Thank you so much for helping me
1 Like