The issue and exceptions to what may be wrong
What you're basically doing here...
if plr.Name == name then
...is that you're comparing a string (plr.Name) to a dictionary (name). If you want to find if a name is equivalent to the player's Name, use a for loop:
for i, ChosenName in pairs(name) do
if ChosenName == plr.Name then
end
end
You might also get yelled at for having the server access the PlayerGui. The server can access the PlayerGui itself but not its descendants with FE on. If it's still giving you an issue, you can always make the script a local script.
3 comments
My game is FE enabled, This script is in ServerScriptService. So the purpose of this script is to place the gui into my playergui, Everything in the gui is Visible. But the GUI doesn't appear nor does the output outputs anything.
You are checking if the player's name is equal to the table, not a specific value(or key) in the table. I'm assuming you only want the people inside the table to get the Gui and you're using them as the keys in the table so to check if they should get it, you simply have to check if the key exists like so: if name[plr.Name] then end (I couldn't post an answer for some reason so here you go)
Forgot to mention that I would recommend using the ID of the people instead of their username just in case they ever change their name, their ID is static. Just replace their names with their IDs and use this if statement: if name[plr.userId] then end