Adding new Pets

I originally showed how we added our own pets into the game during our Pet Inventory episode, which you may be interested in over a text guide.

Model

The setup of the model we use for our pet is one key factor of this system. Each pet model should be stored inside of the ReplicatedStorage/Pets folder. Along with the storage location, our model setup is quite important as well.

  1. The model should be named after the pet type, for instance “Crab”.
  2. The model should have a PrimaryPart, which generally would be the body of your pet.
  3. Each part of the model aside from the part used as the PrimaryPart should be welded to the part you set as the PrimaryPart.
    • Create a Weld Constraint inside of each part aside from the PrimaryPart.
    • Set the Part0 property to the PrimaryPart part.
    • Set the Part1 property to the other part aka the part that you created the Weld Constraint inside of.
  4. Ensure that the Anchored & CanCollide properties of each part inside of your model are set to false.

Config

We now need to add our new pet type and its properties to the Pets config module located inside of the ReplicatedStorage/Configs folder. We store all of our pets and their properties inside of the Config variable located in this module.

ReplicatedStorage/Configs/Pets.lua
local Config: { [string]: PetConfig } = {
  ... -- Represents our other pets
	Crab = {
		Clicks = 1,
		Auto = 1,
		MaxLevel = 1,
		ClicksPerLevel = 10,
	},
}

My Pets are Facing the Wrong Direction

If your pets are facing the wrong direction then you’ll want to adjust their orientation. What I’d recommend doing is viewing which direction our current models are facing and then rotate your own to match them.

  1. Move your pet model and one of my pet models into the Workspace.
  2. Drag the models close to each other in order to be compare the direction they’re facing.
  3. Use the rotate tool or the action (Ctrl + R) to rotate your model until it faces the same direction as mine.
  4. Drag the models back inside of the Pets folder within the Replicated Storage.
Contents