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

How Do I Make A Button Disappear On Click?

Heres what a tried...

script.Parent.Claim.MouseButton1Down:Connect(function)
        script.Parent.Claim.Visible = false
end)

9 comments

0

No you noob! It's

0

script.Parent.MouseButton1Down:connect(function() 2 script.Parent.Claim.Visible = false 3 end)

0

It it a textbutton or a imagebutton?

0

Textbutton

0

Him you're stupid, it doesn't matter if it is a text or image, hence "script.Parent", he's messing up because he's putting what he wants to turn visible in the MoustButton1Down it should be, script.Parent.MouseButton1Down:connect(function()

0

Exactly +JummyTheQb, i just answered the question stating the same thing as you

0

@JimmyTheQb saying stuff like that can get you banned.

0

I'M NOT JUMMY, you did? I don't see your post on here xD

0

Jimmy is still wrong. Not using WaitForChild() in an online server will error. Also, don't be rude, everyone is here to help, just like you.

1 answer

Try using this :

script.Parent.Claim.MouseButton1Down:connect(function()
script.Parent.Claim.Visible = false
end)

If it is a regular script, trying making it into local and using the same code and it should work. Make sure the script isn't inside the button since u wrote script.Parent . If it is inside the button you should use script.Parent.MouseButton1Click:connect(function)

If your using a MouseButton1Down function, its when the player has the left button held down on a mouse, and you need to use a MouseButton1Up or Button1Up to send an event due to the player having the left button released. If i confused you, please comment any further question's.

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