|
| 16 Nov 2012 07:44 PM |
| That would be handy...even if you had bricks you didn't want anchored, it would be faster to unanchor the ones you didn't want anchored than anchoring every single one. |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2012 07:46 PM |
function anchor(obj) for _,n in pairs(obj:GetChildren()) do if n:IsA("BasePart") then n.Anchored=true elseif n:IsA("Model") then anchor(n) end end end |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2012 07:48 PM |
that's a script anyways, it could easily be turned into a plugin :P |
|
|
| Report Abuse |
|
|
thumper10
|
  |
| Joined: 17 Apr 2009 |
| Total Posts: 3304 |
|
|
| 16 Nov 2012 08:03 PM |
I can make one for you right quick, one moment. I'll throw one together.
- thumper10, C# Lover |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2012 08:04 PM |
Create a plugin yourself. Don't copy off others. But I guess I'm bored, so I'll post this plugin script.
local plugin = PluginManager():CreatePlugin() local toolbar = plugin:CreateToolbar("Base Plugin") local button = toolbar:CreateButton( "", -- The text next to the icon. Leave this blank if the icon is sufficient. "Anchor", -- hover text "" -- The icon file's name. Make sure you change it to your own icon file's name! )
button.Click:connect(function() for i, v in pairs(game.Workspace:GetChildren()) do if v.ClassName = "Part" then v.Anchored = true end end end)
print("All Bricks Anchored") |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2012 08:06 PM |
Look at this website to get a little bit more info.
http://wiki.roblox.com/index.php/How_To_Make_Plugins |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2012 08:08 PM |
Oh yeah, by the way, I made a mistake. Put an extra equal sign on the for statement. So it looks like this:
if v.ClassName == "Part" then
and not this:
if v.ClassName = "Part" then |
|
|
| Report Abuse |
|
|
thumper10
|
  |
| Joined: 17 Apr 2009 |
| Total Posts: 3304 |
|
|
| 16 Nov 2012 08:14 PM |
Here you go, I just whipped this up:
-- create the plugin local this = PluginManager():CreatePlugin() local toolbar = this:CreateToolbar() local button = toolbar:CreateButton( "", "Anchor All Bricks", "fakeico.png" )
-- anchor function function anchor(dir) for a, b in pairs(dir:GetChildren()) do anchor(b) end if (b:IsA("BasePart")) then b.Anchored = true end end
-- plugin button click handler button.Click:connect(function() anchor(game:GetService("Workspace")) button:SetActive(false) end) |
|
|
| Report Abuse |
|
|