I am making a notification ui that tells players when an item spawns, but the frame keeps tweening to the wrong location
local plr = game.Players.LocalPlayer
local ts = game:GetService("TweenService")
game.ReplicatedStorage.ItemSpawnClientEvent.OnClientEvent:Connect(function(item)
print("wuh")
local ui = plr.PlayerGui.ItemSpawnGui:Clone()
ui.Enabled = true
ui.Parent = plr.PlayerGui
local frame = ui.ItemSpawnFrame
local clone1 = item.BgGradient:Clone()
clone1.Parent = frame
local label = frame.TextLabel
local clone2 = item.TextGradient:Clone()
clone2.Parent = label
label.Text = ("The "..item.Name.." has spawned")
ts:Create(frame, TweenInfo.new(2), {Position = UDim2.new({0.341, 0},{0.013, 0})}):Play()
wait(3)
ts:Create(frame, TweenInfo.new(3), {Transparency = 1})
ts:Create(label, TweenInfo.new(3), {TextTransparency = 1})
wait(3)
end)
It keeps tweening to {0.318, 0},{0.234, 0} even though it is supposed to tween to {0.341, 0},{0.013, 0}