Objective:
Fix My Mistake with my Gui Tweening Script
issue:
" Players.56ytr56.PlayerGui.inventory.TweenScript:14: attempt to index function with ‘TweenSizeAndPosition’"
Research:
using previous code that has worked, literally 2 lines above it works
(this also happens at line 20)
local gui = script.Parent
local frame = gui.ScrollingFrame
local frame2 = gui.remove
local button = gui.button
local toggle = false
button.MouseButton1Up:Connect(function()
if toggle == false then
toggle = not toggle
button.Text = "Close Inventory"
frame:TweenSizeAndPosition(UDim2.new(0, 200, 0, 250), UDim2.new(0.005, 0, .411, 0))
wait(1)
frame2:TweenSizeAndPosition(UDim2.new(0, 50, 0, 50), UDim2.new(.193,0,.311,0))
else
toggle = not toggle
button.Text = "Open Inventory"
frame:TweenSizeAndPosition(UDim2.new(0, 200, 0, 50), UDim2.new(0.005, 0,0.311, 0))
wait(1)
frame2:TweenSizeAndPosition(UDim2.new(0, 50, 0, 50), UDim2.new(0.14, 0,0.311, 0))
end
end)