I keep recieving this error whenever this piece of code runs in my script. I am confused as to why this is happening as i'm still new to scripting as a whole. Any help will be appreciated
shirts.NameButton.Activated:Connect(function()
for clothesName , clothingData in pairs(clothesData) do
local shirt = character:FindFirstChild("Shirt")
shirt.ShirtTemplate = InsertService:LoadAsset(tonumber(clothesData.Asset)).Shirt.ShirtTemplate
renderPlayer()
end
end)```