How to change mouse icon?

Hello i want to know what’s wrong in my code? i want change the mouse icon, how could i do that?

-- From a LocalScript:

local Players = game:GetService("Players")

local player = Players.LocalPlayer

local mouse = player:GetMouse()

-- Setting the mouse icon

mouse.Icon = "rbxasset://SystemCursors/Wait"
7 Likes

I’m out of ideas if this doesn’t work but try making your photo in replicatedstorage then do

mouse.Icon = game.ReplicatedStorage.Photo

1 Like

i need to use a imagelabel in replicated storage or am i wrong? :scream:

No, I don’t think so. I think it’s a imagelabel.

I don’t understand how to make the image for this part, I’m not sure :scream:

1 Like

how could i attach a image in replicated storage?

you have to make your file with a screenshot for example then on your imagelabel select the photo property and download your photo

No, your code is fine, the issue here seems to be with the referenced icon. It would not use an image label. The rbxasset://SystemCursors/Wait I believe only works with PluginMouse PluginMouse | Documentation - Roblox Creator Hub as mentioned here: Mouse | Documentation - Roblox Creator Hub : quoted directly, "When using a PluginMouse retrieved from Plugin:GetMouse, you can use the following icons similar to your system’s default cursors, such as hands, arrows, I-beams, etc. You can use these with GUI events like MouseEnter, MouseLeave, and MouseButton1Down to provide a consistent studio experience when interacting with certain kinds of GUI components. Note that these only work for studio plugins; they will not work for other Mouse objects. "

2 Likes

i cant attach it here

1 Like

im pretty sure rbxasset only utilizes numbers not characters and slashes

Your solution here could be to upload a decal to the site and use the raw asset image as the icon in the format "rbxassetid://IDHERE"

i did it and got an error

image

local Players = game:GetService("Players")

local player = Players.LocalPlayer

local mouse = player:GetMouse()

-- Setting the mouse icon

mouse.Icon = "rbxassetid://6312174643"

decal page:
https://www.roblox.com/library//Images-sonic

2 Likes

You must do it from a Local Script.

1 Like

Your code has to be from a local script; you could place it in StarterPlayerScripts.

1 Like

Additionally, you’ll need to get the Image asset id. Try this:

local Players = game:GetService("Players")

local player = Players.LocalPlayer

local mouse = player:GetMouse()

-- Setting the mouse icon

mouse.Icon = "rbxassetid://6312174616"

image
image

still not working :frowning:

local Players = game:GetService("Players")

local player = Players.LocalPlayer

local mouse = player:GetMouse()

-- Setting the mouse icon

mouse.Icon = "rbxassetid://6312174616"

Don’t know why you moved it in StarterPlayerScripts, move it to StarterCharacterScripts instead.

7 Likes

It should be working at this point, I’ve replicated your exact situation and it works for me.

4 Likes

Maybe adding wait() before anything else might work.

Oh now it works! Thank you guys so much for your time !! Really :smiley: :smiley: :smiley:

2 Likes