.Activated on GUI buttons partially not firing on mobile?

(Sorry for the repost, title was incorrect)
Hello!
(1) I am here today for I need help with an issue that is preventing me from fully adding mobile support to my game.
(2) The issue I am having is that mobile taps on certain buttons in my game fail to fire the .Activated event.
These same buttons work completely fine on PC. There are a few buttons in my game (simple open/close buttons for certain GUIS) that work completely fine in both mobile/PC. The buttons that are not working are registered, as the button does ā€œgray outā€ as a button would when tapped/clicked, yet the .Activated event for the said button is not fired on mobile but is fired on PC.
(3) I have looked far and wide for a solution to this issue. I have found nothing, which brings me here.
indent preformatted text by 4 spaces
Here is the code on in a localscript parented to a button that does not work on mobile.

	script.Parent.Activated:Connect(function()
	print("hello")
end)

When the said button is clicked (PC), print(ā€œhelloā€) runs, but print(ā€œhelloā€) does not run on mobile.
https://gyazo.com/93d97644df52f641b6903fb11e400297 ← Clicking on PC, with output
https://gyazo.com/85134d8447b6a265706cf68ce65a3f49 ← Tapping on mobile, with output

I am praying that there is some simple property or setting that I overlooked, and can hopefully be fixed.
1 Like

Try replacing ā€˜Activated’ with MouseButton1Click. Also is the active property on your button turned on? If it’s try turning it off and see if the event works.

I used ContextActionService, so I can bind and unbind action when tool is equipped. Here’s script

local CAS = game:GetService("ContextActionService")

local function toolActivated()
	print("Something")
end

script.Parent.Equipped:Connect(function()
	CAS:BindAction("ToolActivated", toolActivated, false, Enum.UserInputType.Touch, Enum.UserInputType.MouseButton1)
end)

script.Parent.Unequipped:Connect(function()
	CAS:UnbindAction("ToolActivated", toolActivated, false, Enum.UserInputType.Touch, Enum.UserInputType.MouseButton1)
end)

MouseButton1Click does not work. In fact, this bug was the reason I started using .Activated, as I thought MouseButton1Click was the issue. Disabling .Active did not fix the issue

Ok, I’m not sure but all i can think of is using ā€˜MouseButton1Up’ or ā€˜MouseButton1Down’. However, I’m quite sure that MouseButton1Click works for most of mobile.

Wait, so this is not for tools?

No, this is for some TextButtons.
The interesting thing is that in some ImageButtons that are completely unrelated to the broken buttons work completely fine…

MouseButton1Down does work for mobile! Yet I would still like to know why .Activated doesn’t work on mobile under certain conditions…

I have found a ā€˜TouchTap’ event that fires when you tap the button.

This is probably something due to the activated function, or property

Not even TouchTap fires… Is this something on my end or have I found a bug…?

May I ask if there is multiple buttons on top of your button?

As in other buttons parented to the button im using?

yes thats what i’m asking. Do you have multiple buttons parented to it. Or do you have any any gui or frame over the button, with active property set to true?

If I’m understanding your question correctly, then no.
https://gyazo.com/6fc3e7045b1efcb7f249db05e7fcfeb4 ← explorer tree w/ button(s)

Which is the button? 30 characters

Are any other events working?

If not, can we see some code?

Also what is the Zindex of the button, is it on top of everything else?

Zindex was the issue, everything was on the same ā€œlevelā€ (1)
Everything appears to be in working order now…

Ok glad to help, zindex can be often forgotten easily.