How to make pet pass through invisible walls

I have made a Pet Gamepass and it works except the pet can’t go through the invisible walls on the map how can I make it so it can go through parts with collision?

Use Collision Filtering and make the invisible walls a collision and the pets a collision, then disable the collision between them.

1 Like

Create a collision group manually or make a script that create a collision group inside serverscriptservice.

game:GetService("PhysicsService"):RegisterCollisionGroup("PetCanCollide")

Then, add the pets and the object you want them to collide into the collision group manually or use a server script to do that.

local obj = your.object.or.pet

obj.CollisionGroup = "PetCanCollide"

Edit for extra context: If you have a folder of objects or pets you can do

for _, obj in pairs(your.folder.directory:GetChildren()) do
    obj.CollisionGroup = "PetCanCollide"
end