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

Why is this script not working?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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

Log in to vote
1
Answered by 10 years ago

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.

0
well then why is there a tone of games that makes u a random person with a random face? cutenipples101 0 — 10y
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. TheRings0fSaturn 28 — 10y
1
Just subtract 1 from the ID then re upload Prioxis 673 — 10y
0
i cant accept both ur guys answers but if i could i would thx cutenipples101 0 — 10y
Ad
Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

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"
0
You could also try a PlayerAdded event from a normal script. Perci1 4988 — 10y
Log in to vote
0
Answered by
Prioxis 673 Moderation Voter
10 years ago

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

Log in to vote
0
Answered by
KenzaXI 166
9 years ago

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.

Answer this question