Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Name only gui help?

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

1 answer

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

1 comment

0

I see where you are coming from, And that is correct. But there is another problem. But thanks for fixing that line. c:

This discussion is preserved as it was. New answers, comments, and votes are closed.