Why isn't the mouse being set?

I copied and pasted this code from the wiki itself. Why is the mouse not changing?

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

Is this in a local script? If so, make sure the script is actually running with a print(“hello!”) statement.
If your script is running, then there is a problem with the link.

Its the image that isn’t loading.

If you uploaded the image recently, it might still be under review.

You’re using an invalid image asset. Use the id 5073034191.

Explanation available from at least three other threads of the same issue.
1 Like

Well, this code doesn’t change the mouse at all.

	local mouse = p:GetMouse()
	mouse.Icon = "rbxassetid://5073034191"

Server scripts can’t get the mouse, let alone change the mouse’s icon. You should read documentation first if you have questions or confusions as to why your applied uses of something don’t work. See:

This item must be used in a LocalScript to work as expected online.

This is a local script. I placed in StarterPlayerScripts.
I also removed the function and just made it

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

Still doesn’t work.

Sure about that? You’re going to have to provide a whole lot more context and detail than “it doesn’t work” if it really isn’t, because I can’t discern anything from that. Can’t repro a problem either.

I am truly baffled, because I have the same scenario. I designed the cursor, I wrote three lines of code in a brand new baseplate so I could work on my mouse code in a controlled environment, and it remains as the same mouse as default. This is odd.