Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Mobile Gui Help?

Asked by
pk008 15
9 years ago

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

Log in to vote
0
Answered by 9 years ago

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)
0
I tried that, but it did not work. I am really confused about this. pk008 15 — 9y
0
Tbh if that's not going to fix it then idk User#6546 35 — 9y
0
More info: It works on both mobile and web when I open it, but it won't close on mobile. pk008 15 — 9y
Ad

Answer this question