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

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

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.

5 comments

0

Sorry Instead of wait I mean print("yes")

0

Nothing wrong with the code, are you able to post a screenshot of the hierarchy?

0

yes

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

2 answers

✓ Accepted answer

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.

2 comments

0

You're right. Thank you alot, this will also help me on future projects!

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.

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