Problem with setting mouse icon

I’m trying to set my mouse icon to a decal I published.
But the cursor does not change nor am I getting any errors.
The localscript is in StarterCharacterScripts.

Here’s the code:

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

mouse.Icon = "rbxassetid://4923744195"

Well then it’s the decal, double check the decal.
And try printing something on the script see if it works, if it doesn’t print then it’s the script’s problem.

The decal was properly published, printing obviously prints and still no errors were thrown.

local mouse = game.Players.LocalPlayer:GetMouse()

print(mouse.Icon) -- prints " "

mouse.Icon = "rbxassetid://4923744195"

print(mouse.Icon) -- prints "rbxassetid://4923744195"

You are using the Decal’s Id, which isn’t the thing mouse.Icon expects

You should get the Image Id (For this one image, it’s 4923744176)

To get the Id you can try entering the Id in a Decal’s Texture property, which should change the id to an appropriate format (rbxassetid://id), which would also convert the Decal Id to an Image Id

1 Like

Thank you so much! But how do you convert a decal id to image id?

  1. Get the Decal Id

  2. Create a Decal

  3. Using the studio’s Explorer, enter the Decal Id in the Decal.Texture property, then wait a few seconds for it to change

  4. Copy the Id from the Decal.Texture property, which should now contain the Image Id instead of the Decal Id

1 Like

Oh yes, I remember doing that before :sweat_smile: