Unable to assign property Text. string expected, got table

Local Script

local function ClonePetFrame(Name, PetName)
	local PetTemplate = script.PetTemplate:Clone()
	PetTemplate.Name = Name -- error line
	PetTemplate.PetName.Text = PetName
	PetTemplate.Parent = Frames.PetsFrame.Main.ScrollingFrame
end
for i,v in pairs(Replica.Data.PetInventory) do
	print(i, v)
	ClonePetFrame(i, v.PetName)  -- error line
end

Output looks when I print(i, v)

It doesn’t work like what you said

for i,v in pairs(Replica.Data.PetInventory) do
	print(i, v)
	ClonePetFrame(v, v.PetName)
end

It’s not a textlabel its a table not an instance.

nvm I fixed it I just have to add tostring.

Are those generated GUID’s? Pass a value of false to HttpService:GenerateUUID so you don’t get the curly braces.

I already solved the problem by just using tostring because, I want it to have brackets.

Was just a suggestion (those curly braces are added by default so I wasn’t sure if you knew or not).