Here is my code so far:
local playerswithpass = game.ServerStorage.Allowed:GetChildren()
repeat wait()
until game.Players.LocalPlayer
Player = script.Parent.Parent.Parent
Gui = Player.PlayerGui.GUI
for i = 1, #playerswithpass do
local allplayers = (playerswithpass[i].Name)
print(allplayers)
if Player.Character == (allplayers) then
Gui.Enabled = true
else
Gui.Enabled = false
end
end

2 comments
Not sure what you mean
when defining player, use LocalPlayer because I assume this is a LocalScript since you use it on line 3.