Fake mouse not centered

So I tried to make a custom cursor by disabling the default one so that the default hover curser doesn’t show up when I’m hovering over a TextButton.

Here is the script:
image
The problem is that the new cursor image appears directly below the mouse, even when I tried to set the anchorpoint to 0.5,0.5.
image

You can use the Mouse property of a GuiObject.

function renderStepped()
    local mouseLocation = uis:GetMouseLocation()
    image.Position = mouseLocation
end

why don’t you just set the icon of the mouse to be the fake cursor:

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Icon = 'rbxassetid://73737626'

Well maybe thats because the developer of that game, wants to have something like if something is on interaction it will change the mouse coursor.

then change it when that happens

Yea I just meant to do an edit, sorry.

I tried this but it didn’t go so well:

image

try this

function renderStepped()
       local mousePosition = UDmin2.new(0, game:GetService('Players').LocalPlayer:GetMouse().X, 0, game:GetService('Players').LocalPlayer:GetMouse().Y)
       image.Position = mousePosition
end

Because if I use that method and hover over a TextLabel it would reset back to the default hover mouse cursor

I’ll try it [max characters blabalaba]

Thanks! It worked [max characters balaba la]

1 Like

No problem! ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ‎‎‎‎‎‎‎‎ㅤ

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.