Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Mobile Gui Help?

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)

1 answer

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)

3 comments

0

I tried that, but it did not work. I am really confused about this.

0

Tbh if that's not going to fix it then idk

0

More info: It works on both mobile and web when I open it, but it won't close on mobile.

This discussion is preserved as it was. New answers, comments, and votes are closed.