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

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

Asked by 5 years ago
Edited 5 years ago

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

Log in to vote
0
Answered by
Sulfone 141
5 years ago

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.

0
welp, turns out that insertservice can't be accessed from a client sided thing, but thanks for the help! RedWirePlatinum 53 — 5y
Ad
Log in to vote
0
Answered by
DJH_100 28
5 years ago

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

0
no you see, 12145059 works but not 12145366, I wanna know if there is a way to get 12145059 from 12145366 RedWirePlatinum 53 — 5y
Log in to vote
0
Answered by
gloveshun 119
5 years ago

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

0
but 12145059 works instead of just the id on the website thing RedWirePlatinum 53 — 5y
0
you only asked how to get the id, and its the answer gloveshun 119 — 5y
0
nevermindddddddd RedWirePlatinum 53 — 5y
Log in to vote
0
Answered by 5 years ago

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)

Answer this question