Code:
local admins = {}
local prefix = "!"
local prefixlen = prefix:len()
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg:sub(1, 8 + prefixlen):lower() == prefix .. "unadmin " then
local TS = msg:sub(9 + prefixlen)
table.remove(admins, TS) -- error is here
end
end)
end)
Anyone know why I'm getting the error invalid argument #2 to 'remove' (number expected, got string)? All help is appreciated!
