Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a command to anchor everything?

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.

1 answer

✓ Accepted answer

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)

7 comments

0

It says:"Error in script: Unexpected Symbol near '2'"

0

How should I fix the error?

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.

0

okay thanks

0

No problem! :D

0

You could

0

Lol, you could've just pressed CTRL + A on your keyboard, and click anchored in the models tab.

This discussion is preserved as it was. New answers, comments, and votes are closed.