|
| 28 Apr 2013 05:44 PM |
How can I make this script only remove parts if it's part of a Player's Character?
local d = game.Workspace.death local open = script.Parent
function onClicked(playerWhoClicked) d.CanCollide = false d.Transparency = 0.5 open.BrickColor = BrickColor.new("Black") wait(3) open.BrickColor = BrickColor.new("Bright green") wait(3) d.CanCollide = true d.Transparency = 0 end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
#YourMother |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
| |
|
|
| 28 Apr 2013 06:45 PM |
When the scripts parent(A part) touches a brick, if it is a Character's part, like left arm or torso, it get's removed.
#YourMother |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2013 06:54 PM |
local h = part.Parent:FindFirstChild("Left Arm") if h ~= nil then h:Destroy() |
|
|
| Report Abuse |
|
|