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

The button doesnt even detect being clicked. How can I fix this?

Asked by 2 years ago
Edited 2 years ago
local Button = script.Parent

Button.MouseButton1Up:Connect(function()
    print("yes")
end)

Inside of a scrolling gui, folder. Its also inside of a part surface gui, yes the surface gui adornee is the part. It doesnt even detect being clicked by a player. The script is a SCRIPT not local script.

The button is clickable, I don't know why it doesnt detect it being clicked.

0
Sorry Instead of wait I mean print("yes") GuestHacks666 20 — 2y
0
Nothing wrong with the code, are you able to post a screenshot of the hierarchy? xInfinityBear 1777 — 2y
0
yes GuestHacks666 20 — 2y
0
Have you tried testing it outside of studio or in the test mode? Also, don't use a local script- they don't run in the workspace xInfinityBear 1777 — 2y

2 answers

Log in to vote
0
Answered by 2 years ago

I don't think you're supposed to put the SurfaceGui INSIDE the part. Try putting it inside a StarterGui instead, and make the Adornee into the part. If the problem persists, please reply and let me know.

0
You're right. Thank you alot, this will also help me on future projects! GuestHacks666 20 — 2y
0
That's odd. When I tested his code I made the exact hierarchy as his and it worked fine. Maybe some sort of bug? Weird. xInfinityBear 1777 — 2y
Ad
Log in to vote
0
Answered by 2 years ago

https://imgur.com/gallery/UyoCqrl

LOCATION OF THE SCRIPT.

0
also, I tried this with a script, and a LocalScript, none of them worked. GuestHacks666 20 — 2y

Answer this question