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

This tweening position GUI will not work? Any fixes? I've checked everything

Asked by
Vid_eo 126
7 years ago

Hey, this GUI that's supposed to tween a shop down wont work. I am aware that I can't close it, but the opening part won't work. Any fixes? I'd say the only possible error would be in the variables, but im pretty sure the variables are correct. Thanks!

local player = game.Players.LocalPlayer
local StarterGui = game.Workspace:WaitForChild("StarterGui")
local ScreenGui1 = StarterGui:WaitForChild("Youtube")
local GUI = ScreenGui1:WaitForChild("Background")
local ScreenGui2 = StarterGui:WaitForChild("ScreenGuia")
local OpenorClose = ScreenGui2:WaitForChild("Openandclose")

OpenorClose.MouseButton1Click:Connect(function()
    GUI:TweenPosition(UDim2.new(0.5, -200,0.5, -150), 'Out', 'Bounce', 1)
end)


  • Clubberoni
0
Its not in the variables im pretty sure, just redid them, still won't work. Vid_eo 126 — 7y
0
Did you name them those specific names? KingLoneCat 2642 — 7y
0
Yes Vid_eo 126 — 7y
0
Are you sure it's not because your Gui is already in the position you're trying to tween to? Also try lower case C in connect. StoIid 364 — 7y
0
you forgot to add the last parameter, in which it is a bool of if the gui tween can be changed midway QuantumToast 261 — 7y

Answer this question