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

Shirt and pants on NPC will not work?

I have a shirt and a pair of pants on an NPC that will not work. I'm quite sure everything is entered correctly. The place, however, is not published.

Here is what I entered for the templates:

//Shirt
"http://www.roblox.com/asset/?id=398633584"
//Pants
"http://www.roblox.com/asset/?id=382537950"

Does anyone know how to get it to work?

1 answer

✓ Accepted answer

You have to subtract the 1 from the number at the end.

This is because roblox stores the actual image it uses in a separate URL for scripters to use. if they did not do this, people wouldn't be able to tell what the image looked like. Your code should look like this,

--Shirt
"http://www.roblox.com/asset/?id=398633583"
--Pants
"http://www.roblox.com/asset/?id=382537949"

But that's only if you know how to use this URL in code. If you do not, comment below and I'll help you. If this isn't what you were asking then maybe try explaining your question a bit more.

Also, using // isn't how you use a comment in Lua. using -- is how you comment in Lua. To make muti-line comments, you do this,

--[[
	Multi-line comments
]]

lol, anyways

Good Luck!

3 comments

0

If I did help you however, make sure to click the accept answer button on the right, under my name. it helps a lot.

0

Thanks so much!

0

<3

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