So I have this script, and if your name is one of the names inserted, you can view a gui, if not then you cant view it. Can anyone help me?
local People = {"NotSoNorm","VisualGraphics"} local P = game.Players.LocalPlayer function Check(name) for i = 1, #People do if (string.upper(name) == string.upper(People[i])) then --Works with lower, hm haven't tested. return true else return false end end end while wait() do if (Check(P.Name)) then script.Parent.SergantCommand.Visible=true else script.Parent.SergantCommand.Visible=false end end
Your first line is wrong, the double quotes should go around one name and then another double quotes for the next name, so like this:
local People = {"NotSoNorm", "VisualGraphics"}
because the way you have it, the table is treating "NotSoNorm, VisualGraphics" as one whole name not individual names