Problem with custom cursor offset

So uh, how do I make it position where the mouse is?

local RunService = game:GetService("RunService")

local UserInputService = game:GetService("UserInputService")

local player = game.Players.LocalPlayer

local mouse = player:GetMouse()

local Frame = script.Parent

RunService.RenderStepped:Connect(function()

Frame.Position = UDim2.new(0,mouse.X,0,mouse.Y)

end)

Screenshot_1332

That looks like the GUI inset! You’re probably positioning your custom cursor in a ScreenGui with IgnoreGuiInset set to true. Because Mouse.X and Mouse.Y respect the GUI inset, it would be easier to just set IgnoreGuiInset to false.

See also: a very similar question, asked 25 days ago, with a few alternatives for those special situations when IgnoreGuiInset needs to be both false and true

In addition to this set the crosshair’s AnchorPoint property to Vector2.new(0.5, 0.5).

I’ve had this problem before, it was solved when I added + 36 to the offset in the Y position. In this case maybe substract it? :thinking:

Thanks for all the help, it kinda works now so I’m happy with that.