.Activated and MouseButton1Click not working for mobile users

Click Billboard UI through the mobile buttons - #8 by 4slug Pretty sure this guy had the same issue.

1 Like

It’s a LocalScript, and it is under PlayerGui. Removing the listeners didn’t work. The strange thing is that the .MouseButton1Down and up both work.

That’s a BillboardGui, I’m looking for an actual screen UI.

I don’t see the issue here in that case. How are you certain that it isn’t working, I just checked and it seems to be working perfectly fine. Can you record a gif of both your workspace and the output so I can better visualize the situation?

1 Like

What I suggest in this case is testing to see if the issue is within the function itself, probably try running the .Activated event to print something and see if that works

Sure, let me just get that ready.

Here’s a screenshot of the hierarchy of PlayerGui. The localscript is where the button controller is.

Testing on computer

With mobile “emulator”:

On my actual phone:

I’ve tried that and nothing was printed.

Try setting the active property for all the UI elements to false

1 Like

I tried it and the same thing happened.

Try creating a new ScreenGUI with a TextButton and the same .Activated event, print anything to see if that event actually works.

1 Like

Yep, creating a new button does activate the .Activated event.

You might wanna try your mute system inside the new ScreenGui to see if that works as well

1 Like

It doesn’t activate in the new ScreenGui.

Do you have any backdoor breaking your scripts?

No, I create all of my scripts from scratch.

Since it’s deprecated, I’m assuming this has something to do with the UICorner instance that you have under the button. This instance is pretty new to Roblox so it might be the case where they forgot to implement it with .Activated, it would explain why MouseButton1Click works as that’s the recommended method of sensing client input on a GUIButton.

1 Like

Yeah, it could be compatibility, however .MouseButton1Click doesn’t work either.

Confused now, If MouseButton1Click isn’t working, its either that the event is getting silenced as in the case when using ContextActionService or your code is never reaching that line that connects the event to a callback.

1 Like

I’m not using CAS, and it works on computer which is weird. I put all the info you asked for in post 16

Full script is in post 4

I see the issue now. It’s most definitely your Z-Index that’s messed up. Try setting the TextButton’s Z-Index to 10. This will make sure that your button isn’t fighting with other elements to be sensed on the screen. The behavior changes with mobile inputs too which would explain why it’s only working on PC.

EDIT: Make sure to mark as solved, when you’ve observed the behavior :slightly_smiling_face:

4 Likes