Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Why I cannot press text button like play button?

Asked by 4 months ago

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?

0
May i see the script please? Retallack445 36 — 4mo
0
What is in the localscript? What do you mean by scriptless button? PhantomBrix 40 — 4mo
0
It doesn't react. So it's just a scriptless or useless button eromusics 10 — 4mo

3 answers

Log in to vote
0
Answered by 4 months ago

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.

0
This might be the answer but it still doesn't work for me. I'll just quit the game since it's a text story game. Thanks eromusics 10 — 4mo
0
Don’t quit! iivSnooxy 248 — 4mo
0
Don’t quit! iivSnooxy 248 — 4mo
0
Don't quit! Dovydas1118 1097 — 4mo
Ad
Log in to vote
0
Answered by 4 months ago

Not an answer but here for example

script.Parent.Parent.Playbutton.MouseButton1Click:Connect(function()
    game.StarterGui.ScreenGui.ImageLabel.Active=false
end)
Log in to vote
0
Answered by 4 months ago
Edited 4 months ago

you can try:

script.Parent.MouseButton1Click:Connect(function()

script.Parent.Parent.Parent.Frame.Visible = false

end)

Answer this question