|
| 03 Jun 2013 09:38 AM |
Just trying to make a simple script like below, but never can remember how to do IsA(s).
hum = script.Parent -- Players model if hum. something Isa "BodyPackage" then something :Remove()
|
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 09:45 AM |
You most do it like this:
if game.Workspace.part:IsA("Brick") then --stuff end |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 03 Jun 2013 09:49 AM |
@shotgreen
"Brick" is not a class name. It's "Part", or "BasePart". |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 09:58 AM |
@Shot,
so for multiple things I would do :
for i, v script.Parent.IsA("Brick") then v:Remove() end |
|
|
| Report Abuse |
|
|
1WOOF1
|
  |
| Joined: 03 May 2009 |
| Total Posts: 20682 |
|
|
| 03 Jun 2013 09:59 AM |
for i,v in pairs(script.Parent:GetChildren()) do if v:IsA("Part") then v:Destroy() end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Jun 2013 11:42 AM |
I haven't read any answers so sorry if it's already been suggested but here's what I use:
-- REMOVE CHARACTER MESHES for a,b in pairs(hum:GetChildren()) do if (b:IsA("CharacterMesh")) then b:Destroy() end end
Simple. ^_^ |
|
|
| Report Abuse |
|
|