Hello Helpers!
I'm trying to move an ImageButton to a certain position, the problem is that I can not make it to return to it starting position every time when I click to another ImageButton
I wanna put the current ImageButton(Obj2).position to a table and make it return to they original position whatever i click to a not equipped GUI
local Empty = false local Positions = {} for i,Obj2 in pairs(Gui.Frame:GetChildren()) table.insert(Positions,Obj2.Position.X and Obj2.Position.Y) Obj2.MouseButton1Down:connect(function() if Empty == false and Obj2.IsEquipped.Value == false then Obj2:TweenPosition(UDim2.new(0.5,-35,1,-70), "Out", "Quad",1) -- equip position Obj2.IsEquipped.Value = true player.Character.Humanoid:EquipTool(v) wait(1) elseif Obj2.IsEquipped.Value == true then Obj2:TweenPosition(UDim2.new(Positions[i]), "In", "Quad",1) -- it's not returning to the original position player.Character.Humanoid:UnequipTools() wait(1) Obj2.IsEquipped.Value = false end end) end
it's moving the ImageButton to position (0,0,0,0) and not to the original position, after the change :(
Sorry, English isn’t my first language.