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

How to get the asset id of a face/image?

So I wanted to be able to make something where you can pick an image based off its id, but when it comes to faces or something, simply picking the id straight off the website doesn't work. Is there a way to be able to get the asset id of a certain face/image? I tried looking it up but it seems like it's impossible. Example

Yes I do know you can put the id in roblox studio and it automatically converts it into a compatible id, But that isn't what I am looking for.

4 answers

✓ Accepted answer

InsertService's LoadAsset can be used to get a face's texture ID. Lets test it with the Freckles face's ID, and move the returned instance to workspace for viewing:

game:GetService("InsertService"):LoadAsset(12145366).Parent = workspace

You should notice a model containing a single decal was placed into workspace, with a correct texture ID (try moving the decal to a part!). This makes writing a function to extract the texture or texture's ID from a face trivial.

However the DevHub for LoadAsset points out, it's a good idea to use pcall for LoadAsset as it may be given an incorrect ID or occationally fail. You may also want to handle cases where correct IDs of anything else than faces (such as hats) are passed.

1 comment

0

welp, turns out that insertservice can't be accessed from a client sided thing, but thanks for the help!

JuSt Go to the url and copy the number, and the num is 12145366

1 comment

0

no you see, 12145059 works but not 12145366, I wanna know if there is a way to get 12145059 from 12145366

Bro, you looks like new in internet, just see the link the link has numbers, those numbers are the Id

3 comments

0

but 12145059 works instead of just the id on the website thing

0

you only asked how to get the id, and its the answer

0

nevermindddddddd

im pretty sure you cant do it with a face, but there might be something with the f3x source code that does that (as long as you enable http service)

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