So recently, I asked a question on how to make a PartRemover and I got this..
function removebricks(PartThatTouched) PartThatTouched:Destroy() end game.Workspace.PartDeleter.Touched:connect(removebricks)
which does WORK, but it still kills me, and I only want this thing to remove parts from workspace, not players. How would I do that?
function removebricks(PartThatTouched) if PartThatTouched:IsA("BasePart") and GetPlayerFromCharacter(PartThatTouched.Parent) == nil then PartThatTouched:Destroy() end end game.Workspace.PartDeleter.Touched:connect(removebricks)
If you are typing out a script that you want to destroy and only destroy the part, then use this script:
game.Workspace.Part:Destroy() ---------- Part can be replaced with anything you are trying to destroy.