The cursor icon of the click detector is not working:

local light = false
local core = script.Parent.Core

script.Parent.ClickDetector.MouseClick:Connect(function()
	if light == false then
		light = true
		core.BrickColor = BrickColor.new("Bright yellow")
		core.Material = "Neon"
		script.Parent.ClickDetector.CursorIcon = "rbxassetid://2680187417"
	else
		light = false
		core.BrickColor = BrickColor.new("Medium stone grey")
		core.Material = "Metal"
		script.Parent.ClickDetector.CursorIcon = "rbxassetid://2680192246"		
	end	
end)

5 comments

0

Does your script error?

0

No, just the cursor icon that is not changing

0

Is this a Script or a LocalScript?

0

Script

1

the script has to be local @Nickzus