How whould i organize this script?

Tell me if this is the wrong category

So, i have a script where:

  1. i press a key
  2. It checks what move i have (for ex: fire or water)
  3. Use the move

But if i add a lot of moves the script will be too long, how whould i organize it so the main script checks for the key press and what move they have and second one will use the move?

Thanks!!

1 Like

You can modularize it like so:

1 Like

Kinda new to module scripts, but how does this work? Sorry again, kinda confused…

ModuleScript is a unique type of script that returns a single value, usually a table or function that’s useful to multiple scripts.

1 Like

But he didnt call the module script… thats why im so confused…

Never mind, figured it out