Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help needed fixing textbutton script that makes frames invisible?

Asked by 2 years ago

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

Log in to vote
0
Answered by 2 years ago

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 =.

Ad

Answer this question