I’m trying to make a ragdoll/anti-respawn system similar to the one in Rogue Lineage. So far have nothing. Basically, when the humanoid dies, they’re “knocked” for around 10 seconds, then they can get back up.
I’ve already tried repeatedly setting the Humanoid Dead state off on both server and client at the same time. I also tried setting the health above zero lol. The StarterHumanoid already has the BreakJointsOnDeath disabled, but I can’t stop it from respawning after 5 seconds.
I also disabled CharacterAutoLoads and set up a custom respawn system, but now I can’t make it so they can get back up after being knocked
If anybody could give me any tips or just how to do it, that would be great.
Instead, you could try:
(HRP = HumanoidRootPart)
On .Died, save their HRP CFrame.
Spawn them in a Spawn box and then move their HRP’s CFrame to their died CFrame.
That’s the only idea I could think of right now, hope you get to the bottom of this.
Rogue Lineage doesn’t ragdoll you when you run out of health, you get knocked when you get to like 10 health iirc. Haven’t played it in a bit so I am not sure.
Clamp a humanoid’s health to a minimum of 0.01 and a maximum of the highest possible health any in-game character is allowed to achieve. You can also use math.huge as a maximum to make it indeterminate.
Any health that is below 1, mark the humanoid as dead and perform your death logic on the character. For the sake of organisation, I suggest bridging the health manager and your death logic with a BindableEvent. Replace all instances of connecting to death towards connecting to this remote.
Humanoid.HealthChanged:Connect(function (newHealth)
math.clamp(Humanoid.Health, 0.01, math.huge)
if newHealth < 1 then
Character.Dead:Fire()
end
end)
You will be held responsible for replicating the death state manually via a RemoteEvent, custom state types or whatever implementation you fancy of getting this done. The BindableEvent is only for the server to bridge death logic.
The point is not to let a humanoid get to 0 health and to implement your own death logic for humanoids.