Custom Cursor Script Not Working

Hello!

I am trying to make a first pearson game that utilizes a dot cursor. However the script does not seem to be working and there are no errors in the output.
image

local mouse = game.Players.LocalPlayer:GetMouse()

mouse.Icon = "rbxassetid://4727466026";

All help is appreciated!

Is your image a Decal? Because if it was uploaded as a Decal, your problem could be your URL. Maybe this will help: It's Impossible to Get an Image ID From a Decal ID - #10 by Subcritical_alt.

Try this, you can remove the RenderStepped event if you want. Make sure your image is a valid and correct ID, (even if the mouse did not turn invisible)

-- From a LocalScript:

local Players = game:GetService("Players")

local player = Players.LocalPlayer

local mouse = player:GetMouse()
-- Setting the mouse icon
game:GetService("RunService").RenderStepped:Connect(function()
	mouse.Icon = "http://www.roblox.com/asset/?id=4727466026"
end)

Try this:

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

mouse.Icon = "rbxassetid://4727466026"