I’m trying to make a downed system and once the players health “dies” I want their health to be set back to 100, but if I do that, they are already dead so I can’t do that.
Pretty sure most games that do this just set their health to something just above 0. If you use custom GUI to display health, then you can use that to display that they’re downed while hiding their actual health.
Yes, that came to mind first, but I have weapons that can do over 100 damage, and I want the damage to cancel out before downing. example If they do 25 damage with 10 health left, they will still be at 100 when downed. sorry if I explained that horribly
You can implement a custom health system that would act as your main health system. Setting a player’s health to 0 without killing the player isn’t necessarily possible.
For example, you can use this to represent your health in a healthbar instead of the default roblox health bar. In most games it would be in your best interest to implement said bar to show how they’re downed.
that may work. I’m using Roblox’s gun system, So I may just need the damage to be doen with a module.
Do you have previous experience making said systems or are you black boxxing?
try to implement custom health system, if player health is below 5 or soo you can play animation and show gui, then if player is healed stop animation and disable gui
pardon? I have no idea what black boxxing is. I’m trying to make the system, and You are right I should have tried to find an alternative to health before I made this post.
Black boxxing is a term used for when you create things without knowing how they work. Health systems arent too hard to implement, especially with your prebuilt roblox gun system.
I do. I know how they work and how to get it done. I was just wondering if there is a way to set the players health to 0 without killing them.
No, there isn’t, besides a custom health system.
For reasons unknown to me, HealthChanged can sort of be used to prevent death. I’m not really sure how exactly it works behind the scenes, but you could play around with it and see what works.
Humanoid.HealthChanged:Connect(function()
if Humanoid.Health <= 0 then
Humanoid.Health = 1
end
end)
custom health system will probably be best as there will be things like shields and other things. (not a Fortnite rip off I swear)
Are you sure? Here’s a clip of this infact, not working.
It circumvents :TakeDamage(), but does nothing when setting health directly or through setting the humanoid state directly.
You are wrong once more. This does not circumvent TakeDamage.
this is a game design question: Should I be able to move when downed?
That’s a question for a separate topic, not scripting help. Please make one.
#help-and-feedback:game-design-support
Seems to work fine for me.
well, it’s a quick question. It not worth wasting resources, but whatever