(Solved) Mobile Users Can't Open Shop

I used .MouseButton1Down and it worked. I’m not sure if that was a bug with Roblox or what.

Epected Output:

I have a button that opens a shop for people to spend their in-game currency in.

Problem:

The problem is PC users can open it by clicking the button, but mobile users can’t. The thing is, the script is looking for an activation of the GUI and not a click of the mouse, so the term I used is most likely not the problem (eg. I used .Activated in stead of .MouseButton1Click).

What I’ve Tried to Do:

I read other DevForum posts and tried to look it up but nothing worked.

Script:

local shop = script.Parent.Parent.Parent.Parent.Shop.Background

local button = script.Parent

button.Activated:Connect(function()

if shop.Visible == false then

shop.Visible = true

end

end)

I’ve always used .MouseButton1Click and I’ve never ran into a problem like this. It also won’t work with .Activated

1 Like

I think if you use .MouseButton1Click it would still work, try doing that, otherwise idk (i’ve used .MouseButton1Click before and it works for mobile)

I used to always use .MouseButton1Click and it worked on all devices but now neither .MouseButton1Click nor .Activated work,

the shop gui could be set on offset and not on scale so check for that

I’m not sure, sorry I couldn’t help

I already did, there’s no offset. In the emulator when I set visible to true, the outline pops up in the center of the screen, but the shop doesn’t show up.

is the shop gui enabled?
fgfgfgfgfgfg

Yeah, it works just fine on PC. I’m not sure why it won’t work on mobile. In the emulator, I also tried to click parts of the player list with text on it that normally works but won’t.

I fixed it by using .MouseButton1Down. I think there is a problem with Roblox or something, but it could very well just be something stupid I did in studio.