Still have questions? Join our Discord server and get real time help.
0

# Is there a command to anchor everything?

Asked by 3 years ago

When I was building a game for a group, I forgot to anchor everything, a noobie I am.. I've looked it up and found nothing because I'm a bigger noob at scripting.Please help.

0
RubenKan 3590
3 years ago

Run this in the command bar. This will loop through every instance in workspace, nested search, and turn every parts anchored value to true.

function FindChildren(Object)
for _,v in pairs(Object:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = true
end
FindChildren(v)
end
end
FindChildren(workspace)

0
It says:"Error in script: Unexpected Symbol near '2'" poopy123guy 0 — 3y
0
How should I fix the error? poopy123guy 0 — 3y
0
You probably copied it with the numbers of the code viewer. Hover on it to the top right and you should see a page <> icon, click on that to get raw data. RubenKan 3590 — 3y
0
okay thanks poopy123guy 0 — 3y
View all comments (3 more)
0
No problem! :D RubenKan 3590 — 3y
0
You could Master_JJ 229 — 3y
0
Lol, you could've just pressed CTRL + A on your keyboard, and click anchored in the models tab. Master_JJ 229 — 3y