Answered by
6 years ago Edited 6 years ago
You have many sensible mistakes, but no worries. I got your back.
1 | game.Players.PlayerAdded:connect( function (plr) |
2 | Admins = { "user" , "user" , "user" } |
4 | for i,values in pairs (admin) do |
5 | if plr.Name = = values then |
6 | script.Parent.Parent.Visible = false |
This is untested, if there is an error, please look in the output and let me know about it.
If you care to read, I'll explain what the code does.
The first line says that when the player enters the game the code inside of it is executed.
The second line is essential and will define any users that should be admin.
The fourth line defines the table's values individually inside of a if loop so that it is ran by the number of values the variable, Admins contains.
The sixth line simply turns the object invisible.