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

Help needed fixing textbutton script that makes frames invisible?

Ok so my script is supposed to make a Frame invisible after the player clicks I'm bad at coding and wanted to know how I would fix this monstrosity of a script

Script.parent.frame.textbutton.onclick.frame.visible false

Sooo yeah please help me fix this

1 answer

I'm not sure if this is the correct path to your button, but if it is then this should work:

script.parent.frame.textbutton.MouseButton1Click:Connect(function()
	script.parent.frame.textbutton.frame.visible = false 
end)

To make the script call when the button is clicked, you need to use MouseButton1Click. And when setting properties for anything, you need to use =.

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