Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is it possible to take a bunch of items, put them in a group, and then anchor them all?

Asked by 3 years ago
Edited 3 years ago

I took a bunch of trees and put them into a group, which turned them into a model. Then I created a script and tried to anchor them, it said there was a problem. Unknown global 'anchored' please help. My script is, "local Trees = game.Workspace.Trees

Anchored.Trees = true"

0
I think I know what the problem is. Can you edit your post and add your script? LeedleLeeRocket 1257 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

This is more of a studio problem than a scripting problem. I suggest that you use the built in feature for anchoring multiple parts in studio. You can find the button next to the Color and Material buttons at the top of the screen. Or alternatively you could use the shortcut Alt+A, which does the same thing.

Ad
Log in to vote
0
Answered by 3 years ago
local Model=workspace.Model

for _,v in ipairs(Model:GetDescendants())do
    if v:IsA"BasePart"then v.Anchored=true;end
end

Answer this question