I tryied that but its Not always looking like its starting from the same point its like 10 cm from the mouse and then its 50 cm from the mouse when i change the scale of the script.Parent
uis.InputBegan:connect(function(input)
game:GetService("RunService").RenderStepped:connect(function()
frame.Position = UDim2.new(0,(mouse.X-frame.Size.X.Offset/2) - script.Parent.AbsoluteSize.X ,0,(mouse.Y-frame.Size.Y.Offset/2) +20)
end)
end)

1 comment
Every time Input begins your RunService event will be created. wich means it will be 1x first input, 2x second input, etc. Inputs also trigger on Keyboard presses.