.Activated and MouseButton1Click not working for mobile users

Try using UserInputService instead as that gives the best compatibility for mobile here you can read more about the functions and UserInputService itself!

UserInputService

You’d also want to use Tool.Equipped instead of Tool.Activated if you are to use UserInputService.

1 Like

I’m using .Activated on a UI here, not a tool.

I don’t think that’s what the OP is talking about… There is an old deprecated event on GUIButtons called Activated. UserInputService would not be of any use in this case.

1 Like

Oh alright my bad,I am not really sure why this isn’t working your code seems to be perfectly fine.

Try deleting the MouseButtonUp and Down events listners to see if that makes a change. Otherwise, it could have to do with external factors. Just make sure it’s a LocalScript under the button in PlayerGui and it should function properly.

1 Like

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.