From Goodblox WikiJump to navigationJump to search
while true do --Starts up a While loop found = game.Workspace:FindFirstChild("Brick") --This looks in the Workspace for anything named "Brick", and sets the variable "found" to whatever object it finds. if found ~= nil then -- This makes sure that it actually found something. If the variable is nothing, then it ends. found.Name = "blah" --Sets the object's name to "blah" end --End the If loop end --End the While loop
Recursive sets whether the function should look inside of objects in the calling object, as well as the calling object.
For example, if there is a part in workspace called "Part" and you use:
It will find the part.