Mouse.Icon doesn't change

Hello fellow Roblox devs,
I recently ran into a problem with the mouse.Icon. I want to archive a custom mouse, but I don’t seem to be able to get it… I first used the exact script from the DevHub , and everything worked fine, but when I modified it to show my custom cursor (which I uploaded about half an hour ago), this error popped up:

Here is the code I used for this, which can be found in the DevHub too:

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "http://www.roblox.com/asset?id=5412918193"

Am I doing anything wrong?

Oh, and by the way, when I used the script without any modifications, the cursor would change to normal when going over a UI element. Any fixes to this?

1 Like

mouse.Target.Icon = “http://www.roblox.com/asset?id=5412918193

1 Like

Also needs to be in a local script since you cant get mouse in a normal script

1 Like

Didn’t work… This is the error that occurred:

Yes, I am using a local script for this

1 Like

Use Mouse.Icon but rbxassetid:// format in link.

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

(^ i guess)

1 Like

My bad
local mouse = game.Players.LocalPlayer:GetMouse()
rbxasset://textures/what icon

1 Like

Still, the first error appeared…

Didn’t have any errors, but the mouse icon didn’t show…

do it without texture

local mouse = game.Players.LocalPlayer:GetMouse()
rbxasset://what icon

This is what @Fel1x_FX suggested. The mouse didn’t show up but there was no error.

is the icon a decal since thats what the id needs to be

Obviously. (30 characters … .) What do you recommend doing?

Probably something with the roblox or your picture. I tried my image and it worked fine.
Try reuploading your picture and try again.

2 Likes

same (30 character limit)…

Didn’t work… The same error occurred. What if you upload the image for me and then send me the ID? Would this be against the ToU?

Worked for me using the image ID instead.

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "rbxassetid://5413529056"
6 Likes

Didn’t work. Why is this so hard?!

1 Like

This WORKED! Yay, thanks @jaydensar

Oh, and how would I make it smaller?

I guess jaydensar beat me to the solution, haha. I was typing mine up.

I still don’t get why image ID’s and decal ID’s are different, it confuses many people.