So basically i'm making a minigame game and i'm making a textbutton only visible to the usernames I put so they can tp to the host box and have easy access to every minigame without needing to fly miles away.
Here is the current script:
local Gui = game.ReplicatedStorage.HostOnlyGui
local Hosts = game.Players:WaitForChild("Nitrolux200")
wait()
Gui.Parent = Hosts.PlayerGui
I tried adding more usernames in "local Hosts" section but it didn't seem to work with multiple, it only works with 1. Can anyone help me know how to make it so I can place in many usernames instead of just 1 [mine] ?

4 comments
Ziffix, in the "local AuthorizedUsers = {" how am I supposed to put the allowed users? Do I put their userid inside "" or no because I tried with the username, userid and all of the ways i thought about but it didn't work.
local AuthorityUsers = { [123456789] = "Username"; }
I use the UserId as key for efficiency and ease. To instantiate the key—which doesn't require anything specific—I use the respective Username to help understand who the UserId belongs to.
Not only that, the UserId is a static identifier; unlike the Name, it won't change, therefore you won't ever have to update the Script.