I want to make a universal way to cut off a limb or kill someone in the workspace for doing a certain action.
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.