The purpose of this script is to make the GUI (script.parent) invisible when the player has a tool in their starterpack. Can someone show me where I went wrong?
Thanks a million, Marcus
man = game.Players.LocalPlayer
c = man.Backpack:GetChildren()
function characterAdded ()
if 1==1 then
for i = 1,#c do
if c[i].className == "Tool" or c[i].className == "HopperBin" then
local gog = game.StarterPack:findFirstChild(c[i].Name)
if gog == nil then
script.parent.Visible = false
end
end
end
end
man.PlayerAdded:connect (characteradded)

1 comment
I edited your question. Please add a codeblock yourself in the future: https://forum.scriptinghelpers.org/topic/82/how-to-format-questions-answers-on-the-main-site