Tell me if this is the wrong category
So, i have a script where:
i press a key
It checks what move i have (for ex: fire or water)
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:
Place the important repeated (or will be repeated) information in the
Module script which will be
The skill function what it actually does
The debounce cool down time
And the enum keycode
Here is how it could work:
Module script:
local clapAni = script:WaitForChild("Clap")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local char = player.Character or player.CharacterAdded:wait()
local root = char:WaitForChild("HumanoidRootPart")
local hum = char:WaitForC…
1 Like
Kinda new to module scripts, but how does this work? Sorry again, kinda confused…
CAROR567
(CarorDeHauteville)
August 16, 2021, 7:46am
#4
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