Custom mouse icon goes back to the default one when hovering over ui

I made a custom mouse icon for my game, but when I hover over a gui the mouse icon goes back to the original icon.


Is there any way around this?
This is what I did:

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

Mouse.Icon = "rbxassetid://5293702148"
3 Likes

If I remember correctly it only happens with buttons right? Sadly I don’t think there is any way to get rid of this behavior. You would have to create custom buttons that used UserInputService, which can be tedious.

If the custom icon was about the same size as the basic one I think players wouldn’t mind it switching.

You can use the mouse hover option when hovering over the frame and then change mouse icon idk

First, Create a ScreenGui with an ImageLabel in side of it adjust it to the size of your liking and image of your liking. (I set the ImageLabels position to something outside of the screens viewing)

Second, Create a local script inside of the ImageLabel and disable the default cursor by using

game:GetService("UserInputService").MouseIconEnabled = false

Third, create a RenderStepped function

Fourth, set an image to follow the mouse cursor inside of the RenderStepped function.

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

in the end it should look something like this:

local RunService = game:GetService("RunService")
local mouse = game.Players.LocalPlayer:GetMouse()

game:GetService("UserInputService").MouseIconEnabled = false

RunService.RenderStepped:Connect(function()
	script.Parent.Position = UDim2.new(0,mouse.X,0,mouse.Y)
end)

image

14 Likes