UserInputService.MouseIcon does not work

I want to change the mouse icon. I try to even force the mouse icon, does not change

game["Run Service"].Heartbeat:Connect(function()
	game.UserInputService.MouseIcon = "rbxassetid://15245649109"
	print(game.UserInputService.MouseIcon)
end)

Expected behavior

The mouse icon to change when I tell it to

2 Likes

Try this :

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

mouse.Icon = "rbxassetid://15245649109"  -- Change to whatever icon you like

PS : This is not a Studio bug, use script support next time :slight_smile:

1 Like

This does not work


Can see it sets it for a split second before reverting back to default for no reason

And even if it did work effectively, GetMouse() is deprecated and Mouse.Icon will be deprecated

Can’t help you more then.
It seems like you have the same problem as this guy.
Everyone else got their mouse changed except you :face_exhaling:

It’s undocumented, but you have to wait until the end of the current frame so input can be processed.

You can try this.

local function SetMouseIcon(Icon: string)
	UserInputService.MouseIcon = Icon
end

task.defer(SetMouseIcon, "rbxassetid://15245649109")

Hey, thanks for the report, just forwarded this to the team!

We tested this, should be working fine, is everything good on your end?

1 Like

It works with other assets, but not with the one provided.
E.g. rbxassetid://14891607998 loads correctly.

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