I am trying to make a loop kill admin command and so I have already written the code which automatically loops through a table of all the different players to loop kill them upon spawning and that works fine but the actual admin command bit isn’t working and can’t find the player.
elseif msg:lower():sub(1,9) == prefix.."loopkill" then --Loopkill command
local player = game.Players:FindFirstChild(msg:sub(11))
table.insert(loopkillPlayers, player.Name)
end
Is there something I’m doing wrong?
(Please note the indentation is fine in the script it just looks a bit messy and out of place here).