Dummy shirt wont change?

local ShirtTotal = 0
for i,v in pairs(game.ReplicatedStorage.Client.Shirts:GetChildren()) do
	ShirtTotal = ShirtTotal + 1
	
	local imgbut  = script.Parent.ShirtSelector.Template:Clone()
	imgbut.Parent = script.Parent.ShirtSelector
	imgbut.Visible = true
	
	local AssetId = v.AssetId.Value
	
	imgbut.Name = "Shirt"..ShirtTotal
	imgbut.Image =  "https://www.roblox.com/asset-thumbnail/image?assetId="..AssetId.."&width=420&height=420&format=png"
	imgbut.ShirtText.Value = "rbxassetid://"..v.AssetId.Value
	
	imgbut.MouseButton1Click:Connect(function()
		print(imgbut.Name)
		workspace.JoinDummy.Shirt.ShirtTemplate = imgbut.ShirtText.Value
	end)
end

The JoinDummy’s shirt does not change, any help on why?

I’m not quite sure what you mean here, but i think you mean it’s not changing on the server.
It looks like you’re doing this in a localscript, which means it’s not going to be replecated to the server. You should call a remoteevent and change the shirt template on the server.
If you’re not quite sure what i mean by “on the server”, then watch this video.

I wanted it changed on the client as it’s for an avatar editor, however, the shirt will not change on the client.

Ok. I think there’s two ids for a shirt. You need the assetid, which you can get from putting the shirt on a dummy in studio manually.

I have the AssetId, which is the asset it’s self, then I need to try and find the TextureId to apply to the shirt.

Each button that is cloned has a child named ShirtText, which just stands for ShirtTexture.
image

And I do not know how to get the shirts TextureID from the asset ID other than doing it manually, but that’s not convenient.

Nevermind, I think I need to do it manually.

I think you can use InsertService:LoadAsset to load in clothing using the AssetId.

I’ve tried that, it cannot be used locally.

I think the best way would be using a remotefunction to get the server to use insertservice. Then return the shirt which has been inserted and copy it to the client. This is the best scaleable and automatic way i can think of.

Save the shirts to ReplicatedStorage and clone the shirts onto the Dummy. Easiest way to do it if there’s a limited amount of shirts.

Are you sure you’re writing this in a Server Script?

See the replies above… He says he doesn’t want it to change on the server.

Or, as I scrolled it up, you told that you were going to do an avatar editor, I would agree with Ty on that the best way to locally apply clothing onto the character is of course cloning those.

Try cloning a shirt instance into the character.

I did it, basically I just made an extra value and placed the textureId inside of it.