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

how do you make a message be a multiple argument command?

For example:

.reward Player Money

.reward would be the key word, player would be a player value, Money would be an IntValue

game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
--i dont know any further.
end)
end)

if there is a wiki link for something like this it'd be just as helpful, thank you!

1 answer

✓ Accepted answer

This involves string patterns, I've given an answer to a similar question you can check out.

After that, I'd do a command table like so:

local Commands = {
	reward = function(...)
		local arguments = {...}

		if #arguments ~= 2 then
			return
		end

		-- Continue
	end
}

Where keys are names of commands, and values are variadic functions.

1 comment

0

thank you, damn this is confusing

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