Changing the mouse icon

So I want to change the mouse Icon whenever you mouse hovers over a specific part.

But the problem is that I get this error constantly:
image

Is there a way I can stop this?

Should I use click detectors?

I think click detectors are your best bet. Try them.

1 Like

I hope this helps you: Mouse | Documentation - Roblox Creator Hub

1 Like
local mouse = game.Players.LocalPlayer:GetMouse()
local parts = {game.Workspace.Part}
local runService = game:GetService("RunService")

runService.RenderStepped:Connect(function()
    if parts[mouse.Target] then
        -- Code you want to run when mouse is over the Part.
    end
end)

This is what I came up with. Hope it helps! Ask me if you have any questions. (This should be placed in starterPlayerScripts as a LocalScript.)

Don’t worry I know how to do that, I made a dragging system and wanted to change the mouse icon when you start dragging a part.

As @chicken_boil has said, you should look into the Mouse.Icon property, where you can also see this part:

Edit: Actually, sorry those were the system cursors for Plugins, but similarly you could change the icon to some other url in code.

1 Like

That’s what I have been doing.

Oh, my bad, didn’t read the post fully. Could you try playing the game in roblox player once and see if the same error occurs?

Otherwise its probably a problem with the image url, I believe.

Wait, I’m dumb the icon didnt get accepted.

I don’t know why though, It was literally just a black dot

Heres the solution I have:
Upload the Image Directly into ur game via
View > Game Explorer > Image [Upload]
Then image = script.Decal.Image