Here is module script:
01 | CommandFunctions = { } |
02 | function CommandFunctions.Speed(Player, Speed) |
03 | Player.Character.Humanoid.Speed = Speed |
04 | end |
05 | function CommandFunctions.Health(Player, Health) |
06 | Player.Character.Humanoid.MaxHealth = Health |
07 | end |
08 | function CommandFunctions.Heal(Player) |
09 | Player.Character.Humanoid.Health = Player.Character.MaxHealth |
10 | end |
11 | function CommandFunctions.God(Player) |
12 | Player.Character.Humanoid.MaxHealth = math.huge |
13 | Player.Character.Humanoid.Health = Player.Character.MaxHealth |
14 | end |
15 | function CommandFunctions.UnGod(Player) |
Here is exact errors:
1 | 17 : 55 : 47.169 - Module code did not return exactly one value |
2 | 17 : 55 : 47.169 - Requested module experienced an error while loading |
3 | 17 : 55 : 47.169 - Stack Begin |
4 | 17 : 55 : 47.170 - Script 'Workspace.Goon' s Admin', Line 2 |
5 | 17 : 55 : 47.170 - Stack End |
You're returning CommandList instead of CommandFunctions, which you defined at the start of the script. Instead of return CommandList, do return CommandFunctions.
1 | return CommandFunctions --at the end of the script |
If you want to access CommandList from other scripts, you can define CommandList as
1 | CommandFunctions.CommandList = { } --insert table here |
If this helps, please accept it as the answer!