Function roblox::function::require [−][src]
pub fn require<'a>(module: ModuleScript<'_>) -> Variant<'a, ()>
Expand description
Equivalent to Variant require(ModuleScript module)
in Luau.
If the ModuleScript
the user
wants to use has been uploaded to Roblox (with the instance’s name being
‘MainModule’), it can be loaded by using the
require_id
function on the asset ID of the
ModuleScript, though only on the server.
Returns
Runs the supplied ModuleScript if it has not been run already, and returns what the ModuleScript returned (in both cases).