Can i Give a plus function to a Udim2

So i was trying to make a Image,when you click on a object ,the image will go up and slowy this is the current code ,is there a way to give plus to a udim2 thing ?

local mouse = plr:GetMouse()
local Icon = Instance.new(“ImageLabel”,plr.PlayerGui.Click.Frame)
Icon.Image = “rbxassetid://5072122534”
Icon.BackgroundTransparency = 1
Icon.Size = UDim2.fromOffset(50,50)
Icon.Position = UDim2.new((mouse.X)/workspace.CurrentCamera.ViewportSize.X,0,(mouse.Y)/workspace.CurrentCamera.ViewportSize.Y,0)
Icon:TweenPosition(UDim2.new(0,50,0,400), “Out”, “Back”, 5, false, nil)
for loop = 0.1,1,0.1 do
Icon.ImageTransparency = loop
wait(0.1)
if Icon.ImageTransparency == 1 then
Icon:Destroy()

1 Like

Can you elaborate:

into something that is more understandable? or you could give an imaginary example of how it would look like if it exists

1 Like

So if i click on a object its gonna make a Image “+1” to i tried to put TweenService but i just can move it from x to y but i just want to add a plus value to Y,Ihope It makes sense i just moved to Ireland so i am practing English a lot :DDD

Alright, if you are talking about adding value to the current udim2 position, then this is an example of how it would be,

local Frame = script.Parent
local currentpos = Frame.Position

Frame.Position = UDim2.new(currentpos.X.Scale,currentpos.X.Offset + 10,currentpos.Y.Scale,currentpos.Y.Offset)

It makes the whole thing move so the image is running away from me ,but thank you i think i can manage the rest.I mainly wanted to see the soulution to move it