This is supposed to destroy the gui
function Play()
game.StarterGui.ScreenGui.Parent.Parent.Parent:Remove()
end
script.Parent.MouseButton1Click:connect(Play)
Output:Players.Player1.PlayerGui.ScreenGui.Frame.TextButton.LocalS:2: attempt to index field 'Parent' (a nil value) What does that output mean?

2 comments
I actully had game startergui screengui TextButton Textlabel
Oh, then, you were probly attempting to use '.MouseButton1Down' on TextLabel, that which is not possible, I'd do instead 'script.Parent.Parent.MouseButton1Down:connect(Play)' would connect the event and function to TextButton.