43
edits
(ClearAllChildren, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstChildOfClass) |
m (→WaitForChild) |
||
Line 3: | Line 3: | ||
Modern versions of ROBLOX include many new features and functions which provide an easier experience for creators to make their own game. Because of this, older ROBLOX clients have far less features and therefore functions to offer. Fortunately, due to these limitations, ROBLOXians have — in the past, and in the now — made their own functions to serve the same purpose as their counterparts in the present. | Modern versions of ROBLOX include many new features and functions which provide an easier experience for creators to make their own game. Because of this, older ROBLOX clients have far less features and therefore functions to offer. Fortunately, due to these limitations, ROBLOXians have — in the past, and in the now — made their own functions to serve the same purpose as their counterparts in the present. | ||
== WaitForChild == | == WaitForChild == | ||
This function | This function keeps cycling around the requested parent until a child with the requested name is found. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local function waitForChild(parent, name) | local function waitForChild(parent, name) | ||
Line 13: | Line 13: | ||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== GetDescendants == | == GetDescendants == | ||
This function is also considered a replacement to a very important function. It returns a table which contains all objects found within a requested object. | This function is also considered a replacement to a very important function. It returns a table which contains all objects found within a requested object. |