What does the keyword "return" means/ and what it does?
COMMUNITY QUESTION
What does the keyword "return" means, and does?
1 answer
Return stops functions in a script.
e.g
function addNumbers(num1, num2)
return num1 + num2
end
a = addNumbers(3, 5)
print(a)
If you have statements before end and after return, you'll receive errors.
So everytime you have a return, make sure to end it afterwards.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thanks, I need an example code with return in it if u can
I've edited the post and got one from the roblox wiki.