TweenPosition having some issues

Hello guys, I was programming a gui and i ran into some problems.

--variables--
local Player = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local PlayerGui = Player.LocalPlayer.PlayerGui or Player:FindFirstChild("PlayerGui")
local TweenService = game:GetService("TweenService")
local RS = game:GetService("ReplicatedStorage")
local MenuMode = RS.Values:WaitForChild("InGameMenu")
local Gamee = PlayerGui:WaitForChild("Game_SUI")
local Menu = Gamee:FindFirstChild("SUI_GameMenu")
local HUD = Gamee:WaitForChild("SUI_HUD")
local Inventory = HUD:WaitForChild("Inventory")

MenuMode.Value = true
UIS.InputBegan:Connect(function(input, gameProccesedEvent)
	if input.KeyCode == Enum.KeyCode.M then
		if MenuMode.Value == true then
			Inventory.Visible = false
			repeat
			wait(0.001)
			Menu.BackgroundTransparency -= 0.1
			until Menu.BackgroundTransparency <= 0.5
			if Menu.BackgroundTransparency == 0.5 then
			task.wait(0.1)
			Menu.Center:TweenPosition(UDim2.new(0.5, 0,1.55, 0),Enum.EasingDirection.In, Enum.EasingStyle.Back, 0.5, true)
			end
		end
	end
end)

The gui that i’m trying to tween doesn’t even move at all and i don’t seem to be getting any errors on the dev console.

Any feedback on how to fix this issue would be really appreciated!

Use TweenService for tweeting other properties instead of using repeat until to set the transparency

https://developer.roblox.com/en-us/api-reference/class/TweenService

I don’t see anything wrong with your code, have you tried adding print to see if the code actually runs?

i added that, it worked but the gui did not still tween…

hm did you add it after the Menu.Center:TweenPosition

i added it at the end of Menu.Center:TweenPosition

just tried it again and it stopped printing at the end of Menu.Center:TweenPosition

try removing the if transparency == 0.5 statement, also you don’t need it because until already checked if the background transparency is less than/equal to 0.5

It didn’t work, I’m still having the same issue

Does this “center” object contain any sort of uilist/uigrid? That may be the issue if so.

no, it doesn’t have any of those objects

Did you attempt to at least debug the situation using print()?

yeah, i did but it doesn’t even print anything anymore…