So, I’ve used this code for a while and to not leave the hair flying around I’ve just destroyed it. But It would be nice to keep the hair on the body.
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
Character.Humanoid.BreakJointsOnDeath = false
while true do
if Character.Humanoid.Health == 0 then
for _, v in pairs(Character:GetDescendants()) do
if v:IsA("Accessory") then
v:Destroy()
end
if v:IsA("Motor6D") then
local Attachment0, Attachment1 = Instance.new("Attachment"), Instance.new("Attachment")
Attachment0.CFrame = v.C0
Attachment1.CFrame = v.C1
Attachment0.Parent = v.Part0
Attachment1.Parent = v.Part1
local BallSocketConstraint = Instance.new("BallSocketConstraint")
BallSocketConstraint.Attachment0 = Attachment0
BallSocketConstraint.Attachment1 = Attachment1
BallSocketConstraint.Parent = v.Parent
v:Destroy()
end
end
Character.Humanoid.BreakJointsOnDeath = true
Character.HumanoidRootPart.CanCollide = false
Character.Head.CanCollide = true
end
wait(0.3)
end
end)
end)