I need help with functions, To where if you click it once you click the textbutton disappears then if you click it again it shows. Any help? If you got skype reply with your skype
COMMUNITY QUESTION
Help with functions?
3 answers
Not a request site but I will get you started
function onClicked() -- function
if script.Parent.Visible == false then -- checks if it is visible
script.Parent.Visible = true
else
script.Parent.Visible = false
end
script.Parent.MouseButton1Down:connect(onClicked) -- Clicked detection
Also not sure what your whole question is because you cant click a button that is not visible.
To do it:
local debounce = true
script.Parent.MouseButton1Down:connect(function()
if debounce == true then
debounce = false
script.Parent.BackgroundTransparency = 1
else
script.Parent.BackgroundTransparency = 1
debounce = true
end
end
Hope I helped :)
local textbutton = script.Parent
function openclose()
if textbutton.Visible == true then textbutton.Visible = false
else
textbutton.Visible = true
end
end
textbutton.MouseButton1Down:Connect(openclose)
Should work. I wrote it quickly though.. comment if it doesn't and I'll fix it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Tab. your. script. jesus. christ.