ImageLabel's position doesn't follow mouse without adjusting manually

I’m trying to make the mouse’s icon stay the same when hovering a textButton.
There are multiple posts here and youtube videos about it. The issue is that the ImageLabel does not move to the cursor just by using the position of the mouse. Instead I have to manually guess/adjust the values that have to be subtracted (last bit in the code).

local mouse = game.Players.LocalPlayer:GetMouse()
local target = script.Parent
local icon = target.ImageLabel

	icon.Visible = true
	game:GetService("UserInputService").MouseIconEnabled = false
	target.BackgroundColor3 = Color3.fromRGB(255, 255, 127)

	icon.Visible = false
	game:GetService("UserInputService").MouseIconEnabled = true
	target.BackgroundColor3 = Color3.fromRGB(0, 255, 127)

	target.BorderSizePixel = 5
	target.BorderSizePixel = 0

	icon.Position =,mouse.X-550,0,mouse.Y-170)

The red circle is where the cursor ends up when hovering the lower button, and when hovering the upper button, it’s completely off the screen. Do I really have to make a custom position for every interactive instance on screen?

Set the ImageLabel’s AnchorPoint to 0.5,0.5 (which is the center). Now you can create a UDim2 just from the mouse’s X and Y offsets, and the image will align itself to make sure the mouse is in the center of it.

It’s still the same as before after changing the anchor point :confused: