Mouse Click Detection

IM making a basic buy button, and the script works and I can buy the stuff and all but 95% of the time the gui doesnt detect the click. I hover my mouse, and the color changes but the click doesent register, this 100% isn’t a scripting problem , the gui is just wierd. It hovers but doesnt detect. Ive noticed when i click and it detects its always the top of the gui ? Any solutions? ( I ve tried changing the detectoin type to mousebutton1down mousebutton1click etc… no change )

1 Like

You dont have more GUIs overlapping? You sure its not detecting the click by using prints?
I dont think this is the issue but I prefer to use Button.Activated:Connect()

i tried using button.activated as well

yea i chcked using prints to make sure its not detecting

wdym by guis overlapping? its in a frame and theirs a few other guis in the frame

1 Like

if the guis are overlapping , iset tthe layout order to 2 so it should be ahead of the other gui’s.

1 Like

I was just asking if theres no more GUIs, on the top. I never had issues with the button not reading the click, and you are sure this is not scriptwise?

1 Like

99 percent sure this isnt script. Ive checked w prints it simly doesnt detect it . It only dtects the click on the top of the gui. Want me to send a video?

1 Like

Sure, a video could help.
What u mean by “detects the click on the top of the gui?”

1 Like

here ill send a video gimme a 2 min to record it and send it

2 Likes

error with upload man :frowning: this sucks

1 Like

Replicate the issue with a new GUI removing your textures and stuff, and send the file in here to check it.
DevForum wont allow videos bigger than 10mb

1 Like

Make sure the GUI’s ZIndex and DisplayOrder is higher than most of the other GUIs. Use lots of print statements just to make sure. Also make sure your using a GUI button and the button is being highlighted when you hover over the button.

also please put all your replies into one message pls its messy wahh :pray:

1 Like

its being hihglighted, and the display order is higher and the gui is a button.

1 Like
__BUTTON.MouseButton1Down.Connect(function()
end)

Mobile-friendly too.

2 Likes

the problem is that it’s only sometimes detecting, not that it isn’t at all I think

3 Likes