String.len() not working as intended

Hi, so I’m making a ban system, however string.len() isn’t working as intended

The code:
image
This should have returned the message after the first two space’s, however, it showed the last two letters of the second split, which wasn’t meant to show.

For referance, the message was: “!ban youfoundbull yes”;
What the string.len() returned was: “ll yes”,
image
I’m probably doing it wrong, can anyone help?

Have you tried subtracting string.len(vic) instead of adding?

maybe you should split() ? its better ig

No, because then I do a string.sub(num, msg.len)

you want make a system with commands?

if it is, maybe this work

local commands = {}

commands.ban = function(Player, args)
	print("your function", args)
    print(args[0], args[1], args[2], args[3])
end

game.Players.PlayerAdded:Connect(function(player)
	task.wait(3)

	--Commands
	player.Chatted:Connect(function(msg, rec)
		task.wait()
		msg = msg:lower()
		local args = msg:split(' ')
		local command = args[1]:split('/')

		if commands[command[2]] then
			commands[command[2]](player, args)
		end
	end)
end)

#string returns the length of string