Gui wont work on mobile

I have a choose spawn gui that works great except for on mobile. The issue is you cant press the buttons. I cant seem to figure out why. And yes I went on my phone and tested it.
video:


code

local spawn1 = game.Workspace.Spawns.Spawn1

script.Parent.Activated:Connect(function(player)
	game.ReplicatedStorage.Spawn:FireServer(3)
	game.Players.LocalPlayer.PlayerGui.SpawnGui:Destroy()
end)


Your getting an infinite yield error I see. That’s probably the cause. Also this is scripting support so seeing the script could help us support (lol)

1 Like

MouseButton1Click() works on mobile, so you don’t need anything fancy for mobile scripts

oops sorry forgot to paste the code

Are you sure you did not use MouseButton For the Gui cause Mobile Devices dont have a mouse as you may know

I didnt use it I used activated

local Spawn1 = game.workspace.Spawn.Spawn1
local Spawn2 = game.workspace.Spawn2

Spawn1.Activated:Connect(function(player)
local Char = player.Character
Char.Humanoid.Health = 0
wait(1)
Humanoid.Position = Spawn1.Position
end)

this wouldnt work because the buttons just cant be pressed. I tried just making the button print on press and nothing happened

I think my issue was the gui autoscale plugin so Im just having a separate pc and mobile gui.

ohh Great Never knew some plugins could corrupt a whole system from proceeding as normal.

Like I stated the yield was the error (caused by the plug-in I assume)