So I have a script that tweens a GUI size to give it a little popup effect. However, it makes my scrolling frame bar disappear!
When it tweens the GUI, the scrolling frame bar just vanishes. Everything inside the GUI stays visible, however. In studio, the scrolling frame is intact and visible. I also do not get any errors in the console.
I’ve been trying to fix this for quite some time and I am stumped.
My issue:
Tween script:
local Player = game.Players.LocalPlayer
local Inventory = Player.PlayerGui:WaitForChild("Main").PetInventory
local Button = script.Parent
local open = Inventory.Open.Value
local rebframe = Player.PlayerGui:WaitForChild("Main").RebirthFrame
local db = false
script.Parent.MouseButton1Click:Connect(function()
if open == false then
if db == false then
db = true
open = true
script.Parent.ClickSound:Play()
Inventory:TweenSizeAndPosition(UDim2.new(0.536, 0,0.66, 0),UDim2.new(0.5, 0,0.48, 0),"In","Quint",0.2)
rebframe:TweenSizeAndPosition(UDim2.new(0, 0,0, 0),UDim2.new(0.5, 0,0.48, 0),"In","Quint",0.2)
wait(0.2)
Inventory.Open.Value = false
db = false
end
else
script.Parent.ClickSound:Play()
Inventory:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(0.5,0,0.48,0),"In","Quint",0.2)
wait(0.2)
open = false
end
end)
Any solutions would be appreciated! Thank you for your time.