oMysti
(oMysti)
May 4, 2021, 5:27pm
#1
Hello There!
Gui Buttons Not Working On Mobile?
My guis have been not working right on mobile all of my buttons dont work on my mobile?
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
oMysti
(oMysti)
May 4, 2021, 5:45pm
#3
isnt that for the mobile buttons that can only appear on mobile?
Yes, but thats what you want right?
1 Like
oMysti
(oMysti)
May 4, 2021, 5:47pm
#5
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
Doqee
(Doqee)
May 4, 2021, 5:53pm
#7
If your script consists of .MouseButton1Click
rather than .Activated
in a TextButton or ImageButton, replace it.
1 Like
oMysti
(oMysti)
May 4, 2021, 5:55pm
#8
so i will need to use .activated then?
Doqee
(Doqee)
May 4, 2021, 5:56pm
#9
Of course, you’d need to use that event for it to activate for all devices.
1 Like
oMysti
(oMysti)
May 4, 2021, 5:59pm
#10
it still doesent work on mobile
Did u used TouchTap event? Maybe that will work.
1 Like
oMysti
(oMysti)
May 4, 2021, 6:03pm
#12
i already tried touchtap event tho
Doqee
(Doqee)
May 4, 2021, 6:05pm
#13
Does the button even work on computers?
1 Like
oMysti
(oMysti)
May 4, 2021, 6:05pm
#14
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
oMysti
(oMysti)
May 4, 2021, 6:09pm
#16
i added the code onto the post topic
Doqee
(Doqee)
May 4, 2021, 6:17pm
#17
Did you publish the game once you’ve replaced the event with .Activated?
1 Like
oMysti
(oMysti)
May 4, 2021, 6:17pm
#18
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
oMysti
(oMysti)
May 4, 2021, 6:22pm
#20
wait i forgot to copy and paste the first line let me edit