Okay, so I want an item to disappear from the workspace after the owner has died. But, I don't know how to rephrase the script to make it remove from the workspace. Use "C4" as an example. Like game.Workspace.c4:remove() Like, how would I rephrase it as the person who had it died? Lets say I had C4 in a game as a gear. I put down Both C4's, then I died before making it explode. I would need the C4 to be removed from the workspace. Those specific C4's put down by that specific person. How would I do that? The C4 is in lighting if you need to know.
Use the 'died' event to do something. it fires whenever a humanoid dies
Example: (localscript in StarterGui)
Character = script.Parent.Parent.Character Character:WaitForChild("Humanoid").Died:connect(function() print "He's Dead Jim!" end)