Gui Buttons Not Working On Mobile?

Hello There!

  1. Gui Buttons Not Working On Mobile?

  2. My guis have been not working right on mobile all of my buttons dont work on my mobile?

  3. I have tried multiple things but for some reason its only on a single game

Code:
script.Parent.Activated:Connect(function()
if script.Parent.Parent.HatsFrame.Visible == false then
script.Parent.Parent.HatsFrame.Visible = true
script.Parent.Parent.COLOR.Visible = true
script.Parent.Text = “Hats - On”
else
script.Parent.Parent.HatsFrame.Visible = false
script.Parent.Parent.COLOR.Visible = false
script.Parent.Text = “Hats - Off”
end
end)

1 Like

Try this.

1 Like

isnt that for the mobile buttons that can only appear on mobile?

Yes, but thats what you want right?

1 Like

no i meant the gui buttons dont work on mobile so if i tap it nothing happens

Oh, did you use MouseButton1Click instead of TouchTap?

1 Like

If your script consists of .MouseButton1Click rather than .Activated in a TextButton or ImageButton, replace it.

1 Like

so i will need to use .activated then?

Of course, you’d need to use that event for it to activate for all devices.

1 Like

it still doesent work on mobile

Did u used TouchTap event? Maybe that will work.

1 Like

i already tried touchtap event tho

Does the button even work on computers?

1 Like

it does work on computer activated and mousebutton

Could you explain more in details and/or share your code? As a developer with zero visualization to your work, it’s difficult to understand what and why it does not work.

I would gladly help you if you do bring in some more details. Thanks!

1 Like

i added the code onto the post topic

Did you publish the game once you’ve replaced the event with .Activated?

1 Like

yes i did (char limittttttttttttttt)

Ok so, I’ve notice that you did not include the event function as a wrap to your code. Which is .Activated.

Is it all? Is it possible that you could share the explorer view of your GUI setup?

1 Like

wait i forgot to copy and paste the first line let me edit