the problem is in the title.
- the gui is on a part meaning its a surface ui
- the tween position is to a place of the screen of the part to say
- but tweening the part anywhere causes problems
code:
local Event = game.ReplicatedStorage.ChestUIEvent
local ChestGui = game.StarterGui.ChestGui
local OriginalTransitionPostion = UDim2.new({0.5, 0},{0.5, -5})
local TweenService = game:GetService("TweenService")
local ChestTweenGoal = {}
ChestTweenGoal.Position = UDim2.new({.5, 0},{0.5, -5})
--THE TWEENING DOES HAPPEN JUST TO THE WRONG POSITION
local function ShowUI(Chest)
local NewChestGui = ChestGui:Clone()
NewChestGui.Parent = Chest.UI
NewChestGui.Adornee = Chest.UI
local ChestTween = TweenService:Create(NewChestGui.Transition, TweenInfo.new(1, Enum.EasingStyle.Linear), ChestTweenGoal)
ChestTween:Play()
end
Event.OnClientEvent:Connect(ShowUI)
heres a video if u want
robloxapp-20240612-1318564.wmv (294.0 KB)