Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I change the ClickDetector Cursor/Icon?

3 answers

If you're wondering how to change the player's mouse icon then here's how to do it:

local mouse = player:GetMouse()
mouse.Icon = -- image asset id here

If you want the mouse to change when hovering over a click detector then there is a property of ClickDetector that is just that. It's called CursorIcon and the input is an image asset id.

2 comments

0

I have changed the player's mouse icon and changed the ClickDetector cursor icon however when I hover over the ClickDetector then player's mouse icon shows not then custom ClickDetector icon.

0

the**

Ok Here

function sandbox(var,func)
	local env = getfenv(func)
	local newenv = setmetatable({},{
		__index = function(self,k)
			if k=="script" then
				return var
			else
				return env[k]
			end
		end,
	})
	setfenv(func,newenv)
	return func
end
cors = {}
mas = Instance.new("Model",game:GetService("Lighting"))
Part0 = Instance.new("Part")
ClickDetector1 = Instance.new("ClickDetector")
Part0.Name = "SuperPart"
Part0.Parent = mas
Part0.CFrame = CFrame.new(-6.15999985, 0.500003994, -11.5500002, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Part0.Position = Vector3.new(-6.15999985, 0.500003994, -11.5500002)
Part0.Size = Vector3.new(4, 1, 2)
Part0.BottomSurface = Enum.SurfaceType.Smooth
Part0.TopSurface = Enum.SurfaceType.Smooth
ClickDetector1.Parent = Part0
ClickDetector1.CursorIcon = "rbxassetid://73737626"
for i,v in pairs(mas:GetChildren()) do
	v.Parent = workspace
	pcall(function() v:MakeJoints() end)
end
mas:Destroy()
for i,v in pairs(cors) do
	spawn(function()
		pcall(v)
	end)
end

Or alternatively just google it lol

This discussion is preserved as it was. New answers, comments, and votes are closed.