Check (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
m Text replacement - "</code>" to "</SyntaxHighlight>"
Tags: mobile web edit mobile edit
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
 
Line 10: Line 10:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
game:GetService('TestService'):Check(false, "example")
game:GetService('TestService'):Check(false, "example")
</SyntaxHighlight>
</syntaxhighlight>


[[Category:Methods]]
[[Category:Methods]]

Latest revision as of 05:10, 27 April 2023

Check( bool condition, string description )
Returns nil
Description: If condition is true, prints "Check passed: ", followed by description to the output, in blue text. Otherwise, prints "Check failed: ", again, followed by description, but in red text.
Member of: TestService

Example

This code would print Check failed: example to the output, in red text.

game:GetService('TestService'):Check(false, "example")