Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can i use returning when developing a game?

I understand the basics on how to use returns, however, i don't understand how it can be implemented into making a game. Feel free to use examples to make your answer more comprehensible.

Thank you :)

1 comment

0

There are many examples of ways to use return. Asking how something so small can be used to create a game is too broad and opinion based.

1 answer

✓ Accepted answer

If you want a separate function in a script that you're likely to use many times then return is quite useful so you will save space.

It is also used for ModuleScripts since when you use a variable to require them, you will get a returned value too through return module.

I couldn't think of a good example but I hope this helps!

This discussion is preserved as it was. New answers, comments, and votes are closed.