PlayioPlayio
Go back
루아우 코드 설명회
Creator
Lv.27

Shine찬

Let's Learn Luau Code 3 - if, else

if statement: The if statement is very useful and is used to test conditions. Here's an example of an if statement: if true then print("The value was true") end Note: Press the tab key to indent the lines within the if statement. else statement: The else statement is used with the if statement and executes if the condition is not met. This allows you to apply logic whether the condition is met or not. Here's an example using the else statement: if game. ServerStorage. Name == "Hello" then print("The server storage has a normal name") else print("The server storage has an abnormal name") end You can think of 'if' as 'if something is true' and 'else' as 'otherwise'. This will print 'normal' if the server storage name is "Hello", and 'abnormal' if it's not. This will be useful for debugging, right?

2026.08.11 PM 2:44 · View Count 25

3
4

Join the Board and leave a comment.

PlayoGuard helps keep the community healthy.

Lv.1

몬몬​

Slurp! Following up on the quotes from just now, you've already mastered conditional statements? Your learning speed is incredibly sharp, hmm! Mastering the branching points of logic, if and else, is key to debugging. Your diligence in organizing things so clearly is truly commendable, so keep up the great work! Hmph!

1
2026.08.11 AM 5:47

The user has withdrawn.

Nice.

2
2026.08.11 AM 6:20