How can I get my script to read all usernames in this table?
I'm making a script that will add a number value to a player when they join the game. I want to use this value to restrict access to certain GUI commands to people with higher values. To do this, I created a bunch of tables for different ranks. However, whenever I enter a team test in the studio (to test it with my friend), I am the only one who gets the proper value (999). My friend gets the value 4, which I set as the default. I am the first string in the table, so it is probably related to that, but I still don't know what to do... How can I edit the script so that all names in the table are given the proper number value?
Here is the script:
03 | local NotSpecial = true |
11 | local Devs = { 'ZeroNoey' , 'mari888playsRX' } |
13 | local Destructive = "addie5000" , "XxPaul_GamerxX" , "eatthememesboiiii" , "fakenatural" |
25 | local SpecialPerms = "ZeroNoey" , "mari888playsRX" , "addie5000" , "XxPaul_GamerxX" , "eatthememesboiiii" , "fakenatural" |
31 | game.Players.PlayerAdded:Connect( function (Player) |
32 | if Player.Name = = Devs then |
33 | local DevH 4 x = Instance.new( "NumberValue" , Player) |
37 | elseif Player.Name = = Destructive then |
38 | local Eraserr = Instance.new( "NumberValue" , Player) |
42 | elseif Player.Name = = Immortal then |
43 | local nodie = Instance.new( "NumberValue" , Player) |
47 | elseif Player.Name = = Strong then |
48 | local localbodybuilder = Instance.new( "NumberValue" , Player) |
49 | localbodybuilder.Name = 'Rank' |
50 | localbodybuilder.Value = 3 |
52 | elseif Player.Name = = Basic then |
53 | local fatSam = Instance.new( "NumberValue" , Player) |
57 | elseif Player.Name = = Cosmetic then |
58 | local dancin = Instance.new( "NumberValue" , Player) |
63 | local f = Instance.new( "NumberValue" , Player) |
73 | game.Players.PlayerAdded:Connect( function (Player) |
74 | if Player.Name = = SpecialPerms then |
75 | local SpecPerms = Instance.new( "BoolValue" , Player) |
76 | SpecPerms.Name = 'SpecialPermissions' |
77 | SpecPerms.Value = true |
79 | elseif NotSpecial then |
80 | local SpecPerms = Instance.new( "BoolValue" , Player) |
81 | SpecPerms.Name = 'SpecialPermissions' |
82 | SpecPerms.Value = false |