What does returning an IF statement do?

I’d like to know what returning an if statement does, does it stop yielding the script? Or does it do something else?

local Something = math.random(1,2)
if Something == 1 then
	return
else
	print("Not 1!")
end

It just stops the script, Basically, Not entirely stop it, But only stop it from running at where the return statement was declared at. Most people use it in-case something or a condition is not met.

1 Like