Gun crosshair not accurately going on mouse position

  1. What do you want to achieve? I am trying to make a crosshair that will go on the cursor

  2. What is the issue? The frame has some type of center, the white box on the top left and that is where the frame goes instead of the middle.

  3. What solutions have you tried so far? Tried looking on developer hub

image
White box or “Center” of the frame seen here
image

Try setting the anchor point of the frame to (0.5, 0.5) to set that box to the middle

https://developer.roblox.com/en-us/api-reference/property/GuiObject/AnchorPoint

@Yarb0b To be honest I was also contemplating if that was the actual solution or not so we both had some issue sending a solution haha

1 Like

Make sure that the “frame” anchor point is: 0.5, 0.5

1 Like

was typing that at the moment, but you was faster, heh

1 Like

That worked, thank you for that

1 Like

Thank you for replying also

30char

1 Like

Yes!, you are right i was like: uhhh what did i even write, oh wait that is the solution right!
i woke up in 5:34 xd

1 Like

ur anchor point is wrong set it to 0.5,0.5