1

# NPC Shirt Is Not What I Picked?

Edited 1 day ago

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**

1
FrindowYT 283
2 days ago

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.

0
Tried that already, it is the shirt ID I wanted. Brioche_Noodle 28 — 1d
0
Also Does Shirt Work With Mesh Dummys? Brioche_Noodle 28 — 1d
0
Weird FrindowYT 283 — 1d
0
I fixed it already! Brioche_Noodle 28 — 1d