Pet system script not working

Hello fellow devforum users! My script refuses to change the image of an image label. All help is appreciated!

local PetTable = require(script.ModuleScript)
local plrs = game:GetService("Players")
local plr = plrs:GetPlayers()[1] or plrs.PlayerAdded:Wait()
local Event = game.ReplicatedStorage.PetRemotes.GetPet

Event.OnServerEvent:Connect(function()
	local newpet = PetTable.ChoosePet():Clone()
	newpet.Parent = plr.Pets
	plr.PlayerGui.EggOpen.PetRays.Pet.Image = newpet.Image
end)

here is an error in the output:
Unable to assign property Image. ContentId expected, got Instance

1 Like

The error is telling you that newpet.Image is returning an instance instead of a string ContentId in the form of rbxassetid://. Try changing newpet.Image to newpet.Image.Image.

2 Likes

Thank you for the help. It is greatly appreciated!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.