I have a server script attempting to change a character’s face (I tried changing both the default face decal and I made my own face part attachment), but I can’t for the life of me get the new texture to display, the face just becomes blank.
Why isn’t this working??? I even tried fromUri and still does not work. ‘face’ contains the asset id of the decals. No errors. Just becomes blank face.
I tried setting the ScriptContext to Script and to Legacy (default), to no avail.
I tried different decals, to no avail. I have wasted 2 hours on this.
So it’s the same image? Ok, it’s static then.
You can quickly convert it to an image ID by creating a decal in edit mode, pasting the ID, and grabbing the ID from the decal; it will be an image ID now.
Also avoid using the concat operation at runtime; you’d better have precomputed strings, etc.
“rbxassetid://00000”
Sorry I may have missunderstood your question earlier, it’s not necessarily one image, the images changes depending on the expression the character is doing. A decal in edit mode though? What does that mean? Sorry, the new APIs are still very new to me..
nevermind missunderstood again. sure i can try that
Copy paste the number part of the string face in a decal/image in studio, if the numbers change you’re using the wrong ID. Simply wait for it to change, then copy the changed value and put that in the script.
(and @NyrionDev ) i appreciate the solution, apparently posting the AssetID doesn’t suffice and you actually have to go on edit mode first for it to parse again. Works lovely now. Thanks both!