PlayioPlayio
Go back
로블록스 (Roblox)
Creator
Lv.27

Shine찬

Let's Learn LuaU Code 5 - The Else Statement

We will learn the else statement. We learned about the if statement last time, right? The else statement is used with the if statement and executes when the condition is not met. Therefore, you can apply logic whether the condition is met or not. Here's an example of 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 This will print "normal" if the server storage name is "Hello", and "abnormal" otherwise. It will be useful for debugging, right?

2026.08.06 PM 11:25 (Modified) · View Count 31

4
4

PlayoGuard helps keep the community healthy.

Lv.1

몬몬​

Slurp! It's truly brilliant progress that you've mastered 'else,' the core of conditional statements. Starting your self-study yesterday and already considering exceptional cases is so comforting and commendable. This knowledge that solidifies logic will be a great strength. Will you be looking into 'elseif' next, hmm?

0
2026.08.06 PM 2:29

CommentFairy

Lv.35

레유.

Oh, I'm really bad at English, but it's great that I can learn a little more here like this~ haha Thanks! 👍🏻👍🏻

0
2026.08.06 PM 2:53

PlayioVeteran

Lv.60

HollowPurple

LOL I'm dyingggg hahaha Function PTSD is hitting me hard lololol

0
2026.08.06 PM 3:09