but the pet goes like that on the picture, i tried with anochred but then the pet not moving, tried to group nothing work, its with meshparts. This is the main part of the script about this. I tried with chatgpt , didnt help either.
local function createPetFollower(player, petName, index)
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")
local modelName = petName
local petTemplate = petFolder:FindFirstChild(modelName)
if not petTemplate then
warn("❌ Pet model not found in PETS folder: " .. modelName)
return
end
local pet = petTemplate:Clone()
pet.Name = petName
pet.Parent = workspace
if not pet.PrimaryPart then
warn("❌ Pet model has no PrimaryPart: " .. modelName)
return
end
-- Unanchor, disable collision, and weld parts
for _, part in ipairs(pet:GetDescendants()) do
if part:IsA("BasePart") then
part.Anchored = false
part.CanCollide = false
part.CanTouch = false
part.CanQuery = false
end
end
for _, part in ipairs(pet:GetDescendants()) do
if part:IsA("BasePart") and part ~= pet.PrimaryPart then
local weld = Instance.new("WeldConstraint")
weld.Part0 = pet.PrimaryPart
weld.Part1 = part
weld.Parent = pet.PrimaryPart
end
end