Need help with ShirtTemplate

I have a script that reverts the player’s clothes to its normal clothes without resetting. But when I want to change the ShirtTemplate of the player’s character’s shirt, it gets the wrong AssetID.

The AssetID I get:

http://www.roblox.com/asset/?id=5542040670

The correct AssetID:

http://www.roblox.com/asset/?id=5542040641

So the problem is, the second AssetID is the correct one and I need that one for the ShirtTemplate. But! I for some reason get the wrong AssetID everytime. I got the AssetID by doing:

local shirttemplate = "http://www.roblox.com/asset/?id=" .. tostring(game.Players:GetHumanoidDescriptionFromUserId(plr.UserId).Shirt)
-- http://www.roblox.com/asset/?id=5542040670 
-- Incorrect one

Is there some alternative way of getting a ShirtTemplate that works?

Any questions are welcome!

1 Like

Try using InsertService and it will insert the shirt with your correct template.

local insertService = game:GetService('InsertService')
local myShirt = insertService:LoadAsset(5542040670):FindFirstChildOfClass('Shirt') -- returns a model so you have to look for the shirt inside
myShirt.Parent = workspace.Dummy
1 Like