Whenever I run the script, I keep getting this error:
15:49:13.197 - BanGUI is not a valid member of PlayerGui "Players.AbsurdAwesome101.PlayerGui"
This is the code:
script.Parent.Equipped:Connect(function()
if lp.PlayerGui.BanGUI ~= nil then
local gui = lp.PlayerGui.BanGUI
local frames = gui:GetChildren()
frames.Visible = true
else
script.Parent.BanGUI:Clone().Parent = lp.PlayerGui
end
end)
this is inside a local script inside a tool. Legit no reason to be giving me errors, so whats wrong????

1 comment
Put if lp.PlayerGui:FindFirstChild("BanGUI") then