Hi! I’ve found out that if you put a custom character to a player, disable The Died state on client and server and set the health to 0, the humanoid state will stop replicating on server!
--put this in server scripts with a custom character named CustomCharacter parented to it
game.Players.PlayerAdded:Connect(function(P)
P.CharacterAdded:Connect(function(C)
local new = script.CustomCharacter:Clone()
new.Parent = workspace
new.PrimaryPart.CFrame = C.PrimaryPart.CFrame
P.Character = new
C = new
local H = C:FindFirstChildWhichIsA("Humanoid")
H:SetStateEnabled(Enum.HumanoidStateType.Dead,false)
H.StateChanged:Connect(function(old,new) -- Will stop replicating states on 0hp ONLY if it has custom character
warn(new)
end)
task.wait(5)
H.Health = 0
end)
end)
--put this in starterplayerscripts
local P = game.Players.LocalPlayer
P.CharacterAdded:Connect(function(C)
local H = C:FindFirstChildWhichIsA("Humanoid")
H:SetStateEnabled(Enum.HumanoidStateType.Dead,false)
H.StateChanged:Connect(function(old,new)
print(new)
end)
end)
after doing this you will notice that when the character reaches 0hp you will not get the warnings anymore since the new states wont replicate, this will keep going unless you make the health ~= 0
THIS BUG APPLIES ONLY IF USING CUSTOM CHARACTERS
Video proof:
Place1.rbxl (336.7 KB)