Line 12 needs to find if the player is either 123thatAlt, Mendez3581, or Player1. Please help me by fixing my error in the script. There is no output from this script.
Pass= script.Parent.Parent.Parent.Passcode function Clicked() for i=1, 10 do wait(0.1) script.Parent.ImageTransparency = script.Parent.ImageTransparency +0.1 end script.Parent.Parent.Visible = false wait(0.3) if script.Parent.Parent.Parent.Parent.Parent.Parent.Name == {"Player1","Mendez3581","123thatAlt"} then for b=1,30 do wait(0.001) Pass.Position = Pass.Position + UDim2.new(0, 7, 0, 0) end end end script.Parent.MouseButton1Down:connect(Clicked)
You should setup a table at the top of your file, then check if the value is valid.
local guiOwner = script.Parent.Parent.Parent.Parent.Parent.Parent
local allowedPlayers = {"Player1", "Mendez3581", "123thatAlt"}
then, at line 12, you add:
for _,plyr in ipairs(allowedPlayers) do if guiOwner.Name == plyr.Name then -- DO STUFF end end