best way to return an if statement roblox code example
Example 1: how to end if statement roblox
-- exits the current scope
if (condition) then
return
print("Hello World!")
end
-- code won't print anything
Example 2: roblox else if
if 25 > 100 then
print("25 is greater than 100")
elseif 25 > 50 then
print("25 is greater than 50")
elseif 25 > 10 then
print("25 is greater than 10")
end