So, I am trying to work on a piece of code that closes a GUI. It works on computer, but does not work on mobile. Any tips?
script.Parent.MouseButton1Click:connect(function() script.Parent.Parent.Play.FriendBox.Visible = false script.Parent.Parent.Play.FriendButton.Visible = false script.Parent.Parent.Play.MultiButton.Visible = false script.Parent.Parent.Play.SingleButton.Visible = false script.Parent.Visible = false script.Parent.Parent:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(0.5,0,0.5,0),"Out","Sine",1.25) wait(1.25) script.Parent.Parent.Visible = false end)
Use TouchTap
local edge = function() script.Parent.Parent.Play.FriendBox.Visible = false script.Parent.Parent.Play.FriendButton.Visible = false script.Parent.Parent.Play.MultiButton.Visible = false script.Parent.Parent.Play.SingleButton.Visible = false script.Parent.Visible = false script.Parent.Parent:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(0.5,0,0.5,0),"Out","Sine",1.25) wait(1.25) script.Parent.Parent.Visible = false end; script.Parent.MouseButton1Click:connect(edge); script.Parent.TouchTap:connect(edge)