Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make every player that exist in Roblox admin?!!?

Asked by 7 years ago
Edited 7 years ago

I want to make everyone in a playerlist of an Admin Model. The question is in the first line:

admins = {"Your Name Here"}

I want to put every players name in here but I cant just write every playername so is there a different way?!?!!? Model: https://www.roblox.com/library/5277383/Person299s-Admin-Command-Script

0
Maybe something with playeradded!? Lolamtic 63 — 7y
0
2:05 PM EST I Upvoted because you made me learn something about tables TinyScripter 70 — 7y
0
Oh ok thx ;D ;) Lolamtic 63 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Just do this in the script!

admins = {
}

game.Players.PlayerAdded:Connect(function(Player)
    local Name = Player.Name
    table.insert(admins, Name)
end)
game.Players.PlayerRemoving:Connect(function(Player)
    local Delete = Player.Name
    table.remove(admins, Delete)
end)
0
That is not how table.remove works. It needs the position of what the value in the table is. For a better description, see http://wiki.roblox.com/index.php?title=Global_namespace/Table_manipulation#table.remove hiimgoodpack 2009 — 7y
Ad

Answer this question