I'm making admin commands that allows the parser to pass multiple commands at once. However, when printing, the commands show in the correct order, and they all show. But when I put the commands into play, the last command is the only one to play.
Eg.
Ff/Player;Sit/Player;Smoke/Player/Colour
The smoke would work, whilst the others wouldn't...
local module = {}
function module.Parser(Player, CmdsTable,msg)
for index = 1, #CmdsTable do
local cmd1 = CmdsTable[index]
local cmd = cmd1:match("([%w]+)"):lower()
local Sender = require(script.Parent.Sender)
wait()
Sender.Send(Player,cmd,msg)
end
end
return module
The table is from another module which takes the text, it is then passed to a matcher to make sure it's just the command that comes out of it (which works). but as soon as I send the cmd to the module which determines which command it is, not all commands are being activated...
Any ideas?
Thank you.
