How would you remove how your body parts fall apart? Because I was thinking of making a gun script where if you get shot, you do certain animations when you die.
COMMUNITY QUESTION
Death animation.
2 answers
You can use the Died event and welds, or if animations support it, the Animation object. I don't recall if animations support dead humanoids, though.
Something like this will probably work. Try it and tinker around.
(Put this into the gun)
game.ReplicatedStorage.Death.Parent = script.Parent.bullet --or whatever you want to call the bullet
(Put this ReplicatedStorage and name it Death)
function onTouched(hit)
local d = hit.Parent:GetChildren()
for i=1, #d do
if (d[i].className == "Motor6D") then
d[i]:remove()
end
end
end
script.Parent.Touched:connect(onTouched)
1 comment
0
Oh never mind. I thought you wanted it to fall apart.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Like check health, and then play animation.