I’m having trouble with changing my mouse icon. The code is correct, and the icon shows up as expected during Roblox Studio tests.
However, when actually playing the game on Roblox, the icon doesn’t show, or rather just shows the default icon. I know there’s something about size limitations, but my cursor image is 8x8 pixels.
I’ve tried cropping the image size using a basic software to 8x8 pixels, and I’ve tried both implementing it on Roblox Studio as my image, and making it a decal to then use as the icon, but none of these solutions worked.
I did then try searching up these solutions, and they did give some ideas, mentioning the icon size limit, and other things irrelevant to my issue.
Please help me with this. Thank you.
Script:
--game.StarterPlayerScripts.MouseIcon:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Icon = "http://www.roblox.com/asset?id=14200341458"
It’s possible your code is running before the Player and Mouse objects are fully initialized. In that case, you should wait for the player to load before setting the mouse icon.
The Asset ID in your code might not be correct or not publicly available. Ensure that you’re using the correct Asset ID, and it is publicly available for use.