Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What happens when you return nothing why does it do nothing?

Asked by 4 years ago
if game.Workspace.Baseplate then

    return
end

if game.Workspace.Baseplate then
    print('G')
end



When I do this it litteraly does nothing not even print

I was wondering why when I did this it dosen't print G

1 answer

Log in to vote
2
Answered by 4 years ago

The content of a Script is effectively the body of a function and the return statement stops execution of the script at that line, the same way that nothing after the return statement inside a function would execute.

Ad

Answer this question