Buttons works on PC, but not mobile?

Hi, I’ve been creating a home menu for my game however when I go and test on mobile, they don’t seem to work, none of them do. They all work fine on PC. Any fixes or suggestions, thanks.

-- Variables --
local playButton = script.Parent.PlayButton
local storeButton = script.Parent.StoreButton
local quitGameButton = script.Parent.QuitGameButton
local storeFrame = script.Parent.StoreFrame
local mainFrame = script.Parent

-- Scripts --
playButton.MouseButton1Click:Connect(function()
	mainFrame.Visible = false
end)

quitGameButton.MouseButton1Click:Connect(function()
	game.Players.LocalPlayer:Kick("You left")
end)

storeButton.MouseButton1Click:Connect(function()
	storeFrame.Visible = true
end)
1 Like

Might be that. If not I don’t know. It’s the only logical answer, which isn’t even logical… might be the mobile device? I don’t know. Is there any other code we can go off by?

1 Like

Not really, unfortunately. There is another button in my game but it’s not a GUI and it works fine on mobile, dunno if that’d have to do with anything though.

I always use MouseButton1Down, it never has a problem on mobile devices. I’d give this a shot, no promises it fixes the issue though.

5 Likes

This works perfectly, thank you!

1 Like