How would I make a ridable creature that can also follow you?

I recently created a custom model of a creature/monster of sorts. I’ve been animating it, giving it a running and idle animation, but I want to know how, with scripting, I could make this creature follow me around - and also be ridden- using those animations.

I know there are “pet tutorials” out there that show you how to make the basic cube “simulator” pet, but from what I’ve seen they use tweens and the pets themselves are overly simplistic.

Basically:

  • How would I go about making this creature follow a specific player around (the “owner”) using the custom animations I have created for it?
  • How would I make this creature able to be ridden, almost like a horse or a car?

I’m quite the newbie when it comes to scripting, but if someone would happen to know where I could start looking to figure out how to do these things (such as what kinds of scripts would this involve), that would be awesome. Thanks y’all!

1 Like

This category is not for you to ask people for entire scripts, but you can get started by looking at YouTube. There are some good scripting tutorials out there.

Also, you could always use the Toolbox (I know.) But if you can build, you can use rig editor plugins to create a rig for the animal and animate it. Then you could edit the scripts for whatever you may have found in the Toolbox. I’ve never tried something like this, so I’m no expert on where to start.

Hope you find out how to do this!

Ah, sorry if this was worded in a way that made it seem like I was asking for an entire script! I was trying to avoid that.

I was trying to ask along the lines of, “What kind of scripting would this involve? Where do I even start to look?”, sort of like asking for key words and things to look for, if that makes sense.

I’ve already gotten my character rigged and animated- I just need assistance on the scripting end, or at least some guidance on which direction to go.

Thank you for your reply, and I’ll keep searching on YouTube for what I’m after!

What I would do for the following part is pretty simple. You want to get the player’s HumanoidRootPart CFrame, and offset it so that the creature will be behind. Then, you can find the Y position of the creature by raycasting down from the X and Z position value of the offset CFrame, and then pivot the creature model to that Y position, and adding half of the height of the model.

Sorry if that didn’t make sense to you, easy for me to think, hard for me to explain.

1 Like

You could use a tutorial like this to make the pet follow you, and create a bool value to check if the player is riding the pet or not, if not the pet will follow the player.

For the riding part, create a vehicle seat, and basically like a car but with a bit more scripting since the car has vehicles with attachments, and surprisingly your pet doesn’t :shock:. You can make the pet move with velocity. There are many tutorials on how to use velocity so you can use one of those to help you out.

1 Like