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

Why is this script not working?

Why won't this script work?

h = script.Parent.Parent.Character.Head
player = game.Players.LocalPlayer
h.face:Destroy()
wait(0.01)
newface = Instance.new("Decal",h)
newface.Texture = "http://www.roblox.com/asset/?id=20722130"

I keep on getting this error: 16:05:25.027 - Image failed to load: http://www.roblox.com/asset/?id=20722130: Failed to resolve texture format

4 answers

✓ Accepted answer

That item might not be for sale. ROBLOX is like that. If a decal isn't for free, they don't allow other people to use it.

4 comments

0

well then why is there a tone of games that makes u a random person with a random face?

1

I would try downloading the image and then reuploading it as a decal. That's probably what most devs do. I would try that.

1

Just subtract 1 from the ID then re upload

0

i cant accept both ur guys answers but if i could i would thx

Tempestatem is correct, but also the character may not be loaded. On top of that, are you sure the face is on the correct Face? Here's how I would do it:

wait(1) --Lets the character load
player = game.Players.LocalPlayer
h = player.Character
h.face:Destroy()
wait(0.01)
newface = Instance.new("Decal",h)
newface.Face = "Front" --Put the new face on the front of the brick
newface.Name = "face"
newface.Texture = "http://www.roblox.com/asset/?id=20722129"

1 comment

0

You could also try a PlayerAdded event from a normal script.

For the decal ID did you subtract 1 from the last digit

If you follow the link down it leads to model. I can tell you tried to copy an actual Roblox face. You tried to use Shiny Teeth, However you can't use the Texture of an on sale Item. You need to use a Decal's Mesh. Here is a link to what you need: http://www.roblox.com/shiny-teeth-item?id=134745574 but to get the Mesh of a Decal you subtract 1 of the asset Id, In this case since the last number is 4 it will become 3. so your Asset Id will be: http://www.roblox.com/asset/?id=134745574 you can locate; Decals, Models, Plugins and Audio at the Library tab which can be found on the Develop page.

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