Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Assets (decals and animations) failing to load?

Asked by
pwnd64 106
2 years ago

Hi, I'm trying to change the mouse icon and load some animations for a gun script. The code is working fine but I run into this issue:

Image https://assetdelivery.roblox.com/v1/asset?id=7309726251 failed to load. Error 403: Asset type does not match requested type

here is the code although i don't think that's the issue. I've run into this problem before but I havent been on roblox in years.

game.ReplicatedStorage.changecursortoreload.OnClientEvent:Connect(function(player)

    mouse.Icon = "http://www.roblox.com/asset/?id=7309726251"

    wait(gun.gunstats.Reloadtime.Value)

    mouse.Icon = "http://www.roblox.com/asset/?id=7309692847"

end)
0
Could you show how you define "mouse"? LioshaPlay 66 — 2y

1 answer

Log in to vote
1
Answered by 2 years ago
Edited 2 years ago

Roblox says that he does not understand what you are demanding from him, what format of the image.

Try this:

game.ReplicatedStorage.changecursortoreload.OnClientEvent:Connect(function(player)
    mouse.Icon = "rbxthumb://type=Asset&id=7309726251&w=150&h=150"
    wait(gun.gunstats.Reloadtime.Value)
    mouse.Icon = "rbxthumb://type=Asset&id=7309692847&w=150&h=150"
end)

In short, this is how you tell the roblox what type of data you want to show it. You can also resize cursor, but keep in mind that you can only use "150x150, 294x144, 420x420, 480x270 and 768x432"

I can recommend uploading images directly through Roblox Studio. To do this, publish the game, Insert Decal anywhere, select the "Texture" field, and you will be prompted to upload images directly from your computer. Once uploaded, you can copy the Texture ID and remove the Decal.

EDIT1: You can also, at the moment of changing "Texture" for Decal, insert the ID of your image and Roblox will re-convert it into the required link format.

Example: You put 7309726251, roblox convert it into http://www.roblox.com/asset/?id=7309726241

In this case, you cannot edit the size of the cursor, and to be honest, it seems to me that it is too large, and for a normal size, I advise you to upload a image with a size from 10x10px to 64x64px.

Ad

Answer this question