local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Icon = 'rbxassetid://139060441101495'
the issue I’m having is when I playtest in studio the mouse icon does get set but when I playtest on Roblox it doesn’t want to set. Anyone know what I could do to fix this?
Using UserInputService’s MouseIcon property is the recommended way of changing the mouse icon:
-- Needs to be a LocalScript or a server Script with its RunContext set to Client
local UserInputService = game:GetService("UserInputService")
UserInputService.MouseIcon = "rbxassetid://139060441101495"
It should work as a LocalScript in StarterPlayerScripts, so the issue is being caused by something else. Are you changing the mouse icon in another script?
You’re the second person I’ve encountered today which is experiencing an issue related to the player’s mouse, each working correctly in Studio but not when using the Player, so I’m really starting to suspect that there’s a bug that’s causing these problems
It’s possible that other scripts are interfering with your mouse icon. If that’s not the issue, a good solution is to update the mouse icon every frame. You can do this with the following code:
Maybe you have the wrong link? Try a Roblox web link. The ID from a rbxassetid link might differ to a web link so you may not be able to just paste the ID into the web link (iirc).