Command Script not working for some reason

I made a command script that tps people and kicks people but it doesn’t work and I don’t know where the error is


local prfix = "/"
local cmds = {}
local bans = {}

local dataStore = game:GetService("DataStoreService")
local banData = dataStore:GetDataStore("BannedData")

players = game.Players

local admins = {"IHAVEAUTOMATICWIFI"}

    end
    
    local ptotp2 = args[1]
    local ptotpn = args[2]

    if ptotp2 and ptotpn then
        local pltotp2 = findPlr(ptotp2)
        local pltotpn = findPlr(ptotpn)
        
        if pltotp2 and pltotpn then
            pltotp2.Character.HumanoidRootPart.CFrame = pltotpn.Character.HumanoidRootPart.CFrame
    end
end

cmds.kill = function(player,otherplayer)
    local vtokill = args[1]
    if vtokill then
       local death = findPlr(vtokill)
       if workspace:FindFirstChild(death) then
          workspace:FindFirstChild(death).Humanoid.Health = 0
      end
   end
end

cmds.kick = function(person,reason)
    local ptkick = args[1]
    local why = args[2]
    if ptkick then
      local plrtk = findPlr(ptkick)
      plrtk:Kick(why)
      print(plrtk.." was kicked out da game")
    end
end

cmds.speed = function()
   local ptogs2 = args[1]
   local amount = args[2]

   if ptogs2 then
      local plr = findPlr(ptogs2)
      if plr then
         plr.Character.Humanoid.WalkSpeed = tonumber(amount)
         print("Given "..amount)
      end
end
players.PlayerAdded:Connect(function(player)
        game.Players.Chatted:Connect(msg)
        if isAdmin(player) then
                   msg = string.lower
        
        local split = msg:split(" ")
        local sCmd = split[1]
        local cmd = sCmd:split(prfix)
        local cmName = cmd[2]
        
          if cmds[cmName] then
             local args = {}
             for i = 2, #split, 1 do
                table.insert(args,split[i])
             end
            cmds[cmName]()
            end
        end
    end)
     
end)



A method used to figure out where the issue exists is to start putting print output lines where you think the issue is (or everywhere if you’re not sure!) and then running the code to see what does and does not output, when you dont get an output you can go back in your code to find where that happened and see what didn’t quite work

What is in the console output screen?

I would recommend rewatching AvlinBlox’s admin command tutorial because you’ve missed some things when making commands.