What i want to do is when i click a button a TextBox and the button's visibility to false, but when i click the button, nothing happens. My code:
game.StarterGui.ScreenGui.TextButton.MouseButton1Click:connect(function(p)
game.Players[p.name].PlayerGui.ScreenGui.TextButton.Visible = false
game.Players[p.name].PlayerGui.ScreenGui.TextBox.Visible = false
end)

4 comments
you need to to conect function
you mean "function"
script.Parent.MouseButton1Click:connect(function()
Oh my bad, i fixed it