Explanation
The reason the output is printing 'Players.ivan6361.PlayerGui.ExitGui.Frame.TextButton:WaitForChild("TextButton")' is because you have defined a variable for TextButton when the local script is the parent of the TextButton already.
Problem
local frame = script.Parent:WaitForChild("TextButton").TextButton.Parent.Frame
If your script is inside a text button, you don't have to define this variable..
Possible solution
Assuming that you want a frame to appear when the TextButton is clicked, then the script would be as follows;
local hum = game.Players:FindFirstChild("Humanoid")
local frame = script.Parent.Parent:WaitForChild("Frame")
wait(.55)
local open = false
script.Parent.MouseButton1Click:Connect(function()
if frame.Visible == false then
frame.Visible = true
else
frame.Visible = false
end
end)
I hope this helps you and please up vote and select this as your answer if it did so..
1 comment
If you don't want the frame to appear, please let me know. I've just assumed this as you didn't said anything about what to appear or what not..