I have a "resume" TextButton in my game's menu. I'd like the menu to disable/disappear when the TextButton is clicked. (Left click/Mouse button 1). Any help is appreciated, thanks :).
function OnClicked() script.Parent.Parent.Active = false script.Parent.MouseButton1Click:Connect(OnClicked) end
the script doesnt WAAARARKKKAKKKRKROAKSDADADAWDASDZCZXCZ >:(
help plz
Perhaps this may work. (Assuming the button is a child of a frame)
-- Put this script inside the "resume" button function onClicked() script.Parent.Parent.Visible = false -- hides the game menu end script.Parent.MouseButton1Down:Connect(onClicked) -- When the user click on the button, it will hide the game menu.
I hope this helps.
local Screen = ScreenGui -- screengui the button is in local press = Button -- The button, can be any imagebutton, textbutton, etc. button.MouseButton1Click:Connect(function() if Screen.Enabled == true then Screen.Enabled = false else Screen.Enabled = true end end)
Should toggle on button press. Works in local or normal. Comment if theres an error