#Argument 1 missing or nil

1 messages · Page 1 of 1 (latest)

candid nexus
#

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)```
copper quest
#
shirts.NameButton.Activated:Connect(function()
    for clothesName , clothingData in pairs(clothesData) do
        local shirt = character:FindFirstChild("Shirt")
            
        shirt.ShirtTemplate = InsertService:LoadAsset(tonumber(clothingData.Asset)).Shirt.ShirtTemplate
        renderPlayer()
    end
end)
candid nexus
copper quest
#

o yya

#

one sec

#
shirts.NameButton.Activated:Connect(function()
    for clothesName , clothingData in clothesData do
        local shirt = character:FindFirstChild("Shirt")
            
        shirt.ShirtTemplate = InsertService:LoadAsset(tonumber(clothingData.Asset)).Shirt.ShirtTemplate
        renderPlayer()
    end
end)
#

try this

candid nexus
#

InsertService cannot be used to load assets from the client
I'm recieving this error instead

#

I assume this is occuring due to something i messed up with