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:
1 | game.StarterGui.ScreenGui.TextButton.MouseButton 1 Click:connect( function (p) |
2 | game.Players [ p.name ] .PlayerGui.ScreenGui.TextButton.Visible = false |
3 | game.Players [ p.name ] .PlayerGui.ScreenGui.TextBox.Visible = false |
4 | 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
1 | script.Parent.MouseButton 1 Click:connect( function () |
2 | script.Parent.Visible = false |
3 | --if the textbox is somewhere else you could use the same thing, but change the location |
4 | --for ex: script.Parent.Parent.Visible = false |
5 | end ) |
1 | script.Parent.MouseButton 1 Click:connect( function () |
2 | script.Parent.Visible = false |
3 | end ) |
local script inside the button