Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make On_Click() for GuiButtons?

So i try this in my guibutton

Button=game.StarterGui.Gui.PlayBtn
function On_click(Button)
	Button:remove()
end

But it dosent work, How do i do this?

1 answer

✓ Accepted answer

Button=game.StarterGui.Gui.PlayBtn script.Parent.MouseButton1Down:connect(function() Button:remove() end

^I'm sure thats it

5 comments

1

oops, forgot to put it in a code block. put end on another line

0

Its ok. i know

0

accept the answer when your done, so we both get a rep point ;)

0

Only One Flaw, it still appears so i added another line: Button.Visible=false

0

uhoh dosnt work

This discussion is preserved as it was. New answers, comments, and votes are closed.