PantsTemplateContent and ShirtTemplateContent not working

when i try to set ShirtTemplateContent or PantsTemplateContent of their respected instance to any editable image, they don’t load in any way or form, server or client, with any testing, they’re just transparent.

for example, this script:
local AssetService = game:GetService(“AssetService”)

local character = script.Parent

local WIDTH = 585
local HEIGHT = 559
local CELL_SIZE = 16

local function createGrid()
local image = AssetService:CreateEditableImage({
Size = Vector2.new(WIDTH, HEIGHT)
})

local size = Vector2.new(WIDTH, HEIGHT)
local pixels = buffer.create(WIDTH * HEIGHT * 4)

for y = 0, HEIGHT - 1 do
	for x = 0, WIDTH - 1 do
		local offset = (y * WIDTH + x) * 4

		local gridX = x % CELL_SIZE
		local gridY = y % CELL_SIZE

		local line = gridX == 0 or gridY == 0

		if line then
			buffer.writeu8(pixels, offset, 255)
			buffer.writeu8(pixels, offset + 1, 0)
			buffer.writeu8(pixels, offset + 2, 0)
			buffer.writeu8(pixels, offset + 3, 255)
		else
			buffer.writeu8(pixels, offset, 255)
			buffer.writeu8(pixels, offset + 1, 255)
			buffer.writeu8(pixels, offset + 2, 255)
			buffer.writeu8(pixels, offset + 3, 255)
		end
	end
end

image:WritePixelsBuffer(
	Vector2.zero,
	size,
	pixels
)

return image

end

wait(2)

local shirt = character:FindFirstChildOfClass(“Shirt”)
local pants = character:FindFirstChildOfClass(“Pants”)

local shirtImage = createGrid()
local pantsImage = createGrid()

if shirt then
shirt.ShirtTemplateContent = Content.fromObject(shirtImage)
end

if pants then
pants.PantsTemplateContent = Content.fromObject(pantsImage)
end (ran on client or server)

Expected behavior

I expected the shirt or pants to load correctly, showing what is on the editable image properly.

3 Likes

Hello, thanks for reporting! Unfortunately, this isn’t a bug since we don’t guarantee that that EditableImage works in all Content properties. Due to Humanoid Texture Compositing, it would be nontrivial to add this support, but feel free to open a feature request. If you do, please include details on what you would use this support for.

2 Likes