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

Can someone explain how to convert a ROBLOX Decal into an rbxasset?

I have found a nice decal for a mouse icon but whenever I try to apply the icon, it just becomes the default mouse icon. Here is the code I used:

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
if player ~= nil then
	print("Player isn't nil!")
	mouse.Icon = "http://www.roblox.com/Asset?id=48980160"
end

This is in a LocalScript under StarterPack

1 comment

0

If I recall correctly, you actually can't change the mouse Icon from the instance returned from mouse.

2 answers

✓ Accepted answer

I don't think you can change the Icon property of PlayerMouse (the mouse returned from GetMouse) unless they changed that.

But if they did change that, you would just subtract 1 from the asset's ID.

mouse.Icon = "http://www.roblox.com/Asset?id=48980159" -- I decremented it

If they hadn't changed that, you would have to do a hack to change it: Force equip the tool Set the icon (from the mouse returned by the Equipped event) Remove the tool (not Destroying)

Also be sure to have a reference to the tool (like: local tool = script.Parent) Also, I am not sure if this hack still works but it's worth a try.

2 comments

0

Thank you very much! I forgot about subracting 1 from the asset's ID. And they did change it, I only had to subtract 1 from the asset ID in my code.

0

No problem, I stated that because in the past, the PlayerMouse object had no Icon property (the mouse returned from GetMouse) so I guess roblox changed that :)

Copy the id of the asset and put it in the id of rbxasset:/

EDIT: Sorry, it's actually "rbxassetid://"

1 comment

0

Doesn't work.

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