I tried making this script but it did not work. (I'm new to scripting so please also tell me how to fix this script so I can learn)
Humanoid.BreakJointsOnDeath
I tried making this script but it did not work. (I'm new to scripting so please also tell me how to fix this script so I can learn)
Humanoid.BreakJointsOnDeath
Why.. would you break the player's joints when they die? They are already dead.
You might be looking for Model:BreakJoints() which kills the character's Humanoid and break its joints (which is literally the same as setting a character's health to 0).
However, since you asked for it, here you go.
I'm working on a fps game and when I test the game I keep holding the gun when I die and I thought that a break joints script would help that's why. Thanks for helping!
Even though the character of the player already breaks its joints when it dies, you can do this instead if it doesn't.
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
character:BreakJoints()
end)
end)
end)
Also, normally a character dies if you break all of its joints.
Also, .BreakJointsOnDeath is a property of humanoid, a bool value. If BreakJointsOnDeath = True (which is by default) then if that character dies its joints are broken
If Break JointsOnDeath = false then when it dies, it's gonna fall straight. https://devforum.roblox.com/t/humanoid-breakjointsondeath/252053
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Um... So now the torso and legs are broken but now the players arms don't break I'm really confused.