Require (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
m Text replacement - "<code lua>" to "<SyntaxHighlight code="lua">" |
m Text replacement - "</code>" to "</SyntaxHighlight>" |
||
Line 10: | Line 10: | ||
<SyntaxHighlight code="lua"> | <SyntaxHighlight code="lua"> | ||
game:GetService('TestService'):Require(false, "example") | game:GetService('TestService'):Require(false, "example") | ||
</ | </SyntaxHighlight> | ||
[[Category:Methods]] | [[Category:Methods]] |
Revision as of 03:55, 27 April 2023
Require( bool condition, string description ) | |
Returns | nil |
Description: | If condition is true, prints Require passed: , followed by description, to the output, in blue text. Otherwise, prints Require failed. Test ended: , followed by description, to the output, in red text, and calls the Done method of the TestService. |
Member of: | TestService |
Example
This code would print Require passed: example to the output, in blue text.
game:GetService('TestService'):Require(false, "example")