LoadLibrary (Function): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
m Text replacement - "</code>" to "</SyntaxHighlight>"
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
Tags: mobile web edit mobile edit
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
This code would load the [[RbxGui (Library)|RbxGui]] library and store it in the variable <var>RbxGui</var>:
This code would load the [[RbxGui (Library)|RbxGui]] library and store it in the variable <var>RbxGui</var>:


<code lua>
<syntaxhighlight lang="lua">
local RbxGui = assert(LoadLibrary('RbxGui'))
local RbxGui = assert(LoadLibrary('RbxGui'))
</SyntaxHighlight>
</syntaxhighlight>


==See Also==
==See Also==

Latest revision as of 05:29, 27 April 2023

LoadLibrary( string library )
Returns RbxLibrary
Description: Loads a library and returns it. If library is not the name of a valid library, false is returned, as well as an error message.


Example

This code would load the RbxGui library and store it in the variable RbxGui:

local RbxGui = assert(LoadLibrary('RbxGui'))

See Also