Sorry for my bad english, i have write this script ->
local debounceimpostazioni = false local function OnClickImpostazioni() if not debounceimpostazioni then debounceimpostazioni = true if ShopGUI.Position == UDim2.new(0.601, 0,0.706, 0) then if Sfondo.Position == UDim2.new(0.601, 0,0.956, 0) then if Audio.Position == UDim2.new(0.226, 0,0.11, 0) then if Gamepasses.Position == UDim2.new(0.483, 0, 1, 0) and Petss.Position == UDim2.new(0.726, 0, 1, 0) then local ImageTween = TweenService:Create(Sfondo,Animation,SfondoBack) local ImageTween2 = TweenService:Create(Audio,Animation,AudioBack) ImageTween2:Play() ImageTween2.Completed:Wait() ImageTween:Play() ImageTween.Completed:Wait() else local ImageTween = TweenService:Create(Audio,Animation,AudioBack) ImageTween:Play() ImageTween.Completed:Wait() end else local ImageTween = TweenService:Create(Audio,Animation,AudioTarget) ImageTween:Play() ImageTween.Completed:Wait() end else local ImageTween = TweenService:Create(Sfondo,Animation,SfondoTarget) local ImageTween2 = TweenService:Create(Audio,Animation,AudioTarget) ImageTween:Play() ImageTween.Completed:Wait() ImageTween2:Play() ImageTween2.Completed:Wait() end end end debounceimpostazioni = false end Impostazioni.MouseButton1Click:Connect(OnClickImpostazioni)
I Need press 2 times for open a GUI, why?
https://www.youtube.com/watch?v=xHtcruovfUY&feature=youtu.be
You can check inside the video i press it 2 times for close the gui
Patched from myself, i just change .Position with .Visible.
This is a Roblox error, not mine ->
local debounceimpostazioni = false Impostazioni.MouseButton1Click:Connect(function() if not debounceimpostazioni then debounceimpostazioni = true if ShopGUI.Position == UDim2.new(0.601, 0,0.706, 0) then if Sfondo.Visible == true then if Audio.Visible == true then if Gamepasses.Visible == false and Petss.Visible == false then local ImageTween = TweenService:Create(Sfondo,Animation,SfondoBack) local ImageTween2 = TweenService:Create(Audio,Animation,AudioBack) ImageTween2:Play() ImageTween2.Completed:Wait() Audio.Visible = false ImageTween:Play() ImageTween.Completed:Wait() Sfondo.Visible = false else local ImageTween = TweenService:Create(Audio,Animation,AudioBack) ImageTween:Play() ImageTween.Completed:Wait() Audio.Visible = false end else local ImageTween = TweenService:Create(Audio,Animation,AudioTarget) Audio.Visible = true ImageTween:Play() ImageTween.Completed:Wait() end else local ImageTween = TweenService:Create(Sfondo,Animation,SfondoTarget) local ImageTween2 = TweenService:Create(Audio,Animation,AudioTarget) Sfondo.Visible = true ImageTween:Play() ImageTween.Completed:Wait() Audio.Visible = true ImageTween2:Play() ImageTween2.Completed:Wait() end end debounceimpostazioni = false end end)