`I am trying to make a admin script and I can't figure out how to make admin tables. I found from a video but it must not be working. Nothing is appearing in the output. I will put both code in here. So examine it and please determine if its correct. Thank you!~~~~~~~~~~~~~~~~~
local dank = {"AwesomeBuilder346"} for i,v in pairs(dank) do game.Players[dank[i]].Chatted:connect(function(msg)
There is a much easier way of doing this without the loop for checking the player name.
local dank = {"AwesomeBuilder346"} --Your table of Admins game.Players.PlayerAdded:Connect(function(player) --When a player joins, get the player's object if dank[player] then --If the table contains the player, then proceed player.Chatted:Connect(function(msg) --And then just do your functions from here. print(msg) end) end end)