Clickdetector Mouse icon issue

This is driving me crazy, the click detector cursoricon won’t work regardless of what I do, I set a custom icon, publish, go in game, and its the default icon, try it in studio? Default icon, try a new studio? Default icon, I don’t know why this is happening but I’ve looked everywhere and can’t find anything about this or any solutions.

  1. What do you want to achieve? Having a custom clickdetector icon.

  2. What is the issue? It won’t save the icon I set, it just resets the field to blank and default icon.

  3. What solutions have you tried so far? New game, restarting studio, trying in studio and trying in game, trying different icons, trying decals owned by me and trying decals not owned by me, nothing will work.

Please help if you know how to fix this.

And also, no script is overriding the click detector’s icon or changing it in any way.

This is unfortunately caused by the property being broken (and has been for quite some time), what you can instead do is listen for the ClickDetector’s MouseHoverEnter/MouseHoverLeave events and change the mouse’s cursor icon that way.

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

local clickPart = workspace:WaitForChild("Part")
local clickDetector = clickPart:WaitForChild("ClickDetector")

clickDetector.MouseHoverEnter:Connect(function(player)
	if player == localPlayer then
		mouse.Icon = "rbxassetid://163023520"
	end
end)

clickDetector.MouseHoverLeave:Connect(function(player)
	if player == localPlayer then
		mouse.Icon = ""
	end
end)

https://developer.roblox.com/en-us/api-reference/property/Mouse/Icon

This script sets the local player’s mouse icon to an image of a dragon, this can be changed if necessary.

This would be a local script inside the StarterPlayerScripts folder.

5 Likes

Thanks.
Is this a roblox-wide bug? If so why hasn’t it been fixed yet, it seems like a pretty annoying bug for games that heavily rely on clickdetectors.

4 Likes

This script doesn’t work in game.

I’m just gonna bump this topic to explain real quick.

That’s because the click detector doesn’t really show on Roblox Studio but it does on the Roblox Engine.

3 Likes