Luckyxero
|
  |
| Joined: 26 Feb 2014 |
| Total Posts: 505 |
|
|
| 04 Sep 2016 11:25 AM |
| how do i choose only parts when i make for i,v in pairs(game.Workspace.Model:GetChildren()) do |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2016 11:27 AM |
IsA("BasePart) http://wiki.roblox.com/index.php?title=API:Class/Instance/IsA |
|
|
| Report Abuse |
|
|
Luckyxero
|
  |
| Joined: 26 Feb 2014 |
| Total Posts: 505 |
|
|
| 04 Sep 2016 11:38 AM |
| where do i put IsA("BasePart") |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2016 11:40 AM |
for i,v in pairs(game.Workspace.Model:GetChildren())do if(v.ClassName=="Part")then
end;end |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2016 11:40 AM |
^ no
className is awful for this if you want to get anything that can be welded (all baseparts) without having to do
if v.className == "something"
over 9 times |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 04 Sep 2016 11:42 AM |
I would still use IsA and not ClassName though
IsA has more functionality |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2016 11:49 AM |
| @thedailyblarg he said "how do i choose only parts when i make for i,v in pairs(game.Workspace.Model:GetChildren()) do" im understanding that by "i want to use 'v as one of evry ######### som like #### ## da workspace which IsA("Part")" :P |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2016 11:50 AM |
so, parts can refer to a part or multiple types of parts
and if he decides that his model has unions or meshes, they will not work :) |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2016 12:30 PM |
| well he didn't said that he wants em "to work" :P |
|
|
| Report Abuse |
|
|