What do you want to achieve?
A menu Gui that tweens in and out.
What is the issue?
It won’t move to the proper position after the tweening.
What solutions have you tried so far?
I have kept trying but I can’t figure it out.
This is the script. I get 0 errors from it.
local Icon = require(game.ReplicatedStorage.Icon)
local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
Icon.new()
:setName("MenuIcon")
:setImage(6521414236)
:setLeft()
:bindEvent("selected", function()
local Menu = PlayerGui:WaitForChild("Menu")
local MainFrame = Menu.MainFrame
Menu.Background.Visible = true
MainFrame:TweenPosition(UDim2.new({-0.029, 0},{-0.208, 0}), "Out", "Quad", .1, true)
for i=0.01, 0.3 do
Menu.Background.BackgroundTransparency = i/0.3
wait(0.01)
end
end)