Conditionals

Series Description

Many experiences have actions that only take place if a list of requirements are met. You may have seen rooms only specific teams could enter or inventory items only some players could purchase. This series will cover how to set up code that says, "If this happens, then do that."

Objectives and Prerequisites

Learning Objectives

Understand the logic behind if then statements and how to set up multiple scenarios with the keywords elseif and else.

Prerequisites

Before beginning this course, readers should be able to navigate Roblox Studio, as well as declare new variables and functions.

Series Contents

ArticleDescription
Intro to If StatementsLearn how if statements work and how to code them within Roblox Lua.
If Statement Practice: Trap PartsUse conditionals to create better traps that only hurt avatars and humanoids.
If Statement Practice: Power UpsPractice using if statements and create a part that increases the players' walking speed.
Multiple ConditionsDesign code that accounts for multiple scenarios with else and elseif.
Multiple Conditions Practice: Awarding PointsUse everything learned about conditionals to create a part that can award points to players.