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

How do i get a random shirt for a npc? (FE)

My attempt

shirts = {650162633}

local randomshirt = math.random(1,#shirts)
local clothing = script.Parent.Clothing

clothing.ShirtTemplate = 'http://www.roblox.com/asset/?id=' ..randomshirt

1 comment

0

And yes i know theres only one shirt (just showing the shirt is the issue)

1 answer

✓ Accepted answer

You forgot to mention the table so it's shirts[randomshirt]

shirts = {650162633}

	local randomshirt = math.random(1,#shirts)
	local clothing = script.Parent.Clothing

	clothing.ShirtTemplate = 'http://www.roblox.com/asset/?id=' ..shirts[randomshirt]

2 comments

0

-facepalm- to me lol

0

Haha it is okay :P

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