Mouse Icon Flickering When Changing Between Enabled / Disabled

  1. What do you want to achieve?
    I have a door system that if you hover over the button the Mouse Icon will change to a hand. If you don’t hover over the button the MouseIconEnabled will be set to false. This is because normally in my game there is no mouse in the first place.

  2. What is the issue? Include screenshots / videos if possible!
    The issue is the flickering when hovering off the button. Even though the Default Mouse Icon is set to the hand? Here is what I mean:

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried setting the Mouse Icon to transparent and it didn’t work. Furthermore, I couldn’t find any similar developer posts with a question such as mine. Thank you for any help.

-- Door Script (server) 
	Events.Door:FireClient(Player, true)

	Events.Door:FireClient(Player, false)

-- Local Script 
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage.Events

local mouse = game.Players.LocalPlayer:GetMouse() 
mouse.Icon = "rbxassetid://4786916921" 

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

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

This is happening because the information that is sent from the server to disable the mouse to the client, takes sometime to arrive, which will create a delay.

One question, is the mouse’s icon always that hand thing? Or do you change it to that hand thing only when it enters the clickdetector?

The Mouse Icon is always the hand. When the player joins I change it to the hand. That’s why it should work? It looks like the default Mouse Icon is not changing to the hand. Even though I did:

local mouse = game.Players.LocalPlayer:GetMouse() 
mouse.Icon = "rbxassetid://4786916921" 

Executes as soon as they join the game.

Interesting. The thing is, there is no way you can prevent the delay, unless the mouse entering/leaving is done on the client. But what you can do is stop the default mouse icon from showing up, so even if there is a delay, the hand will be there and it will fool the eye and it wouldn’t be that big of a problem. I’m not sure why the default mouse icon is there. Perhaps a bug when disabling then enabling the mouse.