| |
|
| |
|
| |
|
TheMinid
|
  |
| Joined: 20 Jun 2012 |
| Total Posts: 128 |
|
|
| 27 Dec 2013 01:10 PM |
| Im really, really new to scripting, but isnt it " instead of ' |
|
|
| Report Abuse |
|
|
gdaka
|
  |
| Joined: 29 Dec 2011 |
| Total Posts: 1438 |
|
|
| 27 Dec 2013 01:10 PM |
Yes. I had to bump my thread 21 times before two people responded "That's enough bumps!" |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 27 Dec 2013 01:14 PM |
| if v.ClassName == not 'Seat' then v.Anchored = true |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 01:15 PM |
idfk I understand, you want all parts with the ClassName of seat to be anchored. I've never seen this before since I'm new, but try naming all the seats something all the same like 'Seat' or something.
for i,v in pairs(workspace:GetChildren()) do if v.Name == "Seat" then v.Anchored = true end end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 27 Dec 2013 01:18 PM |
He does NOT want seats anchored.. But maybe he haves seats inside a model and he can't access them with that script and that's why it won't work. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 01:18 PM |
k get out I tried to help you. You're welcome. You won't get any help if you keep bumping. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 01:19 PM |
| Stawp with the 1 minute bumps. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 27 Dec 2013 01:25 PM |
Does the GetChildren method searches INSIDE the childrens of Workspace? Because if your parts are in a model, and the GetChildren method doesn't go that deep, it won't be able to find them. I'm not an experienced scripter, sorry.
~Kingmouli, King of the Mouli~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Dec 2013 01:27 PM |
for _,v in pairs(Workspace:GetChildren()) do if v.ClassName == "Part" then v.Anchored=true end end |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 01:28 PM |
| thatll return all things with the classname of part,so it wont return a seat:) |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 27 Dec 2013 01:30 PM |
for _,v in pairs(Workspace:GetChildren()) do if v.ClassName ~= "Seat" then v.Anchored = true end end |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 01:38 PM |
| for _,v in pairs(Workspace:GetChildren()) do if not v:IsA("Seat") and v:IsA("BasePart") then v.Anchored=true end end |
|
|
| Report Abuse |
|
|