function Dispatcher.Run(q,...)if not Players.LocalPlayer then error("\068\105\115\112\097\116\099\104\101\114\058\082\117\110 \099\097\110 \111\110\108\121 \098\101 \099\097\108\108\101\100 \102\114\111\109 \116\104\101 \099\108\105\101\110\116\046")end local B={...}local j=B[1]for q=2,#B,1 do j=j..(" "..tostring(B[q]))end local S,D=q:Evaluate(j,Players.LocalPlayer)if not S then error(D)end local L,E=S:Validate(true)if not L then error(E)end return S:Run()end
--- Invoke a command programmatically as the local user e.g. from a settings menu
-- Command should be the first argument, all arguments afterwards should be the arguments to the command.
function Dispatcher:Run(...)
	if not Players.LocalPlayer then
		error("Dispatcher:Run can only be called from the client.")
	end

	local args = { ... }
	local text = args[1]

	for i = 2, #args do
		text = text .. " " .. tostring(args[i])
	end

	local command, errorText = self:Evaluate(text, Players.LocalPlayer)

	if not command then
		error(errorText) -- We do a full-on error here since this is code-invoked and they should know better.
	end

	local success, errorText = command:Validate(true) -- luacheck: ignore

	if not success then
		error(errorText)
	end

	return command:Run()
end
