I'm very good at stupid mistakes and it's rather late so this may be a bit dumb. I am trying to make a script which only allows certain users to see a GUI. It works and tells me that my name is not equal to the first one on the list but it fails on the second. Here is the console output:
One-click random building placer loaded
22:08:47.000 - Unable to load plugin icon. Image may have an invalid or unknown format.
22:08:47.016 - Unable to load plugin icon. Image may have an invalid or unknown format.
22:08:47.267 - Workspace.Script:4: attempt to index global 'player' (a nil value)
22:08:47.268 - Stack Begin
22:08:47.268 - Script 'Workspace.Script', Line 4
22:08:47.268 - Stack End
{Increated Inc}
Name = Player Should Be: Increated
22:08:48.323 - Players.Player.PlayerGui.Increated Inc.LocalScript:13: attempt to index field '?' (a nil value)
22:08:48.324 - Stack Begin
22:08:48.324 - Script 'Players.Player.PlayerGui.Increated Inc.LocalScript', Line 13
22:08:48.325 - Stack End
22:08:48.912 - Attempt to connect failed: Passed value is not a function
22:08:48.912 - Script 'Players.Player.Backpack.DecoyDeploy.DecoyDeployScript', Line 93
22:08:48.913 - Stack End
And Here is the code:
-- Increated Inc | 29/10/15
-- Gui Authorisation Script
print("{Increated Inc}")
-- Config
guipath = script.Parent.Frame
authorised = {"Increated", "Player"}
-- /Config
players = game.Players:GetChildren()
for i=1, #players do
for i = 1,#authorised do
if players[i].Name == authorised[i] then
guipath.Visible = true
break
else
print("Name = "..players[i].Name.." Should Be: "..authorised[i])
guipath.Visible = false
end
end
end
