local hum = game.Players:FindFirstChild("Humanoid")
local frame = script.Parent:WaitForChild("TextButton").TextButton.Parent.Frame wait() local open = false
script.Parent.MouseButton1Click:Connect(function() if frame.Visible == false then frame.Visible = false else frame.Visible = false end end)

6 comments
Please write down your code in proper code format so I can take a c!ear look into your script. I can't understand this script..
Assuming your script is formatted properly in your script, I would rename local frame variable and see if you get the same error. Looks like a sequencing error with the parent.
Yeah probably..
well i fixed the problem and now i have inf yeild
Please make sure your script is in proper code format and infinite yeild means that something does not exist, make sure everything you inputted on the script actually exists.. What is the full output error?
Infinite yield possible on 'Players.ivan6361.PlayerGui.ExitGui.Frame.TextButton:WaitForChild("TextButton")'