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.
COMMUNITY QUESTION
How do I make an item disappear from the workspace after the person that put it down has died?
1 answer
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
This is not a request site! Actually do some research and give us some code to help fix before you ask!
Nope, don't know what you're talking about. I'm looking for help. Meaning I've been getting help from this site in the past.
Perhaps set the parent of the placed C4 to the Character model. When the character dies and disappears, the C4 disappears with it.