I want to make a universal way to cut off a limb or kill someone in the workspace for doing a certain action.
COMMUNITY QUESTION
How do you make a kill script not specific to one person?
1 answer
script.Parent.Touched:connect(function(hit) --touched is when a player touches the parent of this script.
if hit.Parent and hit.Parent:FindFirstChild("Humanoid") then --checks to make sure it is a player
hit.Parent.Humanoid:TakeDamage(100)--amount of damage to deal to the player.
hit:Destroy() --removes the limb.
end
end)
put this in a normal script inside of the part you want to take a limb, and kill the player with.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
This is not a request site please add code that needs to be fixed and the error or what needs to be fixed.