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)
Put this in a localscript inside the button you want the player to click, then here's an example of how to make it so when clicked the visibility is false
script.Parent.MouseButton1Click:connect(function() script.Parent.Visible = false --if the textbox is somewhere else you could use the same thing, but change the location --for ex: script.Parent.Parent.Visible = false end)
script.Parent.MouseButton1Click:connect(function() script.Parent.Visible = false end)
local script inside the button