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

NPC Shirt Is Not What I Picked?

So Basically I Made A Walking NPC Script And I Wanted To Add Random Shirts From My Table, I Went Online To See Some Answers and saw:

Functions and variables


shirts = {6922626706, 6706140296}

local randomshirt = math.random(1,#shirts)
local clothing = npc.Shirt

function format(Id)
	return string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", Id)
end

Change Shirt

clothing.ShirtTemplate = format(shirts[math.random(1, #shirts)])

Also I didn't do this in separate scripts

Problem Is When I Test The Game The Shirt, Is Not What I Expected. It had a sphere dummy head and a black thing on the waist?

And Also The Shirts Arent The Problem.

Please Correct Me If I Am Wrong, Do I Need A Remote Event/Function/Bindable?

And Just To Remind You, Stay Safe!

EDIT: ** Sorry To Waste Your Time But Actually The Image Was The Shirt But A Dummy Wore It XD**

2 answers

I believe that you are putting in the wrong shirt / pants ID's. Insert a shirt into workspace. Paste the link of your shirt and then copy the asset ID from there inside. The shirts should attach to the NPC afterwards.

4 comments

0

Tried that already, it is the shirt ID I wanted.

0

Also Does Shirt Work With Mesh Dummys?

0

Weird

0

I fixed it already!

Sorry To Waste Your Time But Actually The Image Was The Shirt But A Dummy Wore It XD

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