I made a text button much like those play buttons. i put local script inside it and boom it's not working. I cannot press it. It's like a scriptless button. Any idea?
So there are a few issues with your script. First of all, you need to edit your question to include the script (but that's a bit off-topic.) Secondly, When you use StarterGui, it will immediately replicate everything to the PlayerGui
. So here's the solution. Put your localscript UNDER the ScreenGui
not under the Playbutton
.
script.Parent.Playbutton.MouseButton1Click:Connect(function() script.Parent.ImageLabel.Visible = false end)
Now what are the edits I made? First of all, you can just put your GUIs under one ScreenGui, so just put your ImageLabel under the ScreenGui. Secondly, you don't need to set the Active property. You can set the visible property to false. Also, I would like to add, once the button is clicked, it will remain false, for as long as possible. Just remember, when you're changing things in the StarterGui, it won't change anything. You need to access the ImageLabel either using script.Parent
or the PlayerGui
.
Not an answer but here for example
script.Parent.Parent.Playbutton.MouseButton1Click:Connect(function() game.StarterGui.ScreenGui.ImageLabel.Active=false end)
you can try:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.Frame.Visible = false
end)