✓ Accepted answer
Try doing this on the Server when a player is added to the game
ServerScript
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
end)
end)
Since this is not replicated, you need to do the same thing on the client
Local Script
local player = game.Players.LocalPlayer
repeat wait() until player.Character ~= nil and workspace:FindFirstChild(player.Name) ~= nil
local humanoid = player.Character:WaitForChild("Humanoid")
humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
The Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false) already prevents the JointBreak on its own once these are in place
EDIT: Since you seem to still be having issues, assuming you don't want to weld the player's parts on death, you can use the LoadCharacter() Event to instantly respawn when you die
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
humanoid.HealthChanged:Connect(function(health)
if health <= 0 then
player:LoadCharacter()
end
end)
end)
end)
I will note that there is a property of the Humanoid named "BreakJointsOnDeath" which is automatically set to true, however, it seems to be "Read-Only".
2 comments
how about you put that script in serverscriptservice or use remote event if only on client
Anchor the character, lol jk.