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

ANSWERED (By Me) | Why is my Click detector Custom Cursor not loading?

I am trying to get a click detector to have a custom cursor image, however whenever i manually set it, it deletes my input the next time I opened it

So I created a script that would create a new one when the server starts, but then i get the error 09:51:46.582 - Image "https://assetdelivery.roblox.com/v1/asset?id=4905779029" failed to load in "Mouse Cursor": Request failed

Here is my script:

-- The door 'BasePart'
local clickimage = script.Parent
print(clickimage)
 
-- Asset ID of the image you want the to set the cursor to
local CursorId = "4905779029"
print(CursorId)
 
-- Create a ClickDetector
local ClickDetector = Instance.new("ClickDetector")
ClickDetector.Parent = clickimage
print(script.Parent:WaitForChild("ClickDetector"))
ClickDetector.MaxActivationDistance = 32
ClickDetector.CursorIcon = "rbxassetid://"..CursorId
print(script.Parent:WaitForChild("ClickDetector").CursorIcon)

Just a side note, all of the print() functions come up in the output, I only get the error when I go to click on the object, and instead of giving me my custom cursor, it hides the cursor.

Any help would be much appreciated ???? Thanks in advance

2 comments

0

Maybe a different script is causing this because from that error I can tell that the id is not the same as in this script.

0

oops, I posted the wrong error!

1 answer

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