Follower / Pet system?

I’m working on a Follower // Pet system, however I’m having some difficulties maintaining a constant speed between the Player & Pet.

As shown below, my follow system results in a some-what jittery movement - I’m looking to have the Pet follow the Player itself rather than follow behind or alongside (As done in Loomian Legacy).

I’ve tried all sorts of different methods and had no luck as of yet - Does anyone have any suggestions?

			local Distance = (HumanoidRootPart.Position - _PetModel:WaitForChild("Walker")["Torso"].Position)
			local Magnitude = Distance.Magnitude
			
			if Magnitude > (_PetModel["Obj"]["Base"].Size.X / 2) + 1 then
				CanFollow = true
				print("FOLLOW")
			elseif Magnitude < (_PetModel["Obj"]["Base"].Size.X / 2) + 1 then
				CanFollow = false
				print("STOP")
			end

			if CanFollow then
				_PetModel["Walker"]["NPC"]:MoveTo((HumanoidRootPart.CFrame * CFrame.new(Vector3.new(0, 0, 0))).p)
			else
				_PetModel["Walker"]["NPC"]:MoveTo(_PetModel["Walker"]["Torso"].Position)
			end

4 Likes

Whats the actual code that makes the pet follow? Right now all you’ve shown is how it starts and stops?

3 Likes

Sorry! Didn’t realise the code had cut off - Have updated.

Seems like move to gets called a lot, maybe instead of moveTo you could offset the pet by a certain distance?

In terms of that, how would I go about it?
Below is the form of movement I’m attempting to achieve.

Looks clean! The way the bunny jumps so smoothly

Oh that was the example Sorry!

That’s what I’m trying to mimic. It’s not mine aha

Hmm, Maybe Trying changing the rotation to where ever the player is at so it looks at The player Because from your example seems like it works fine the only issue is not getting close and not turning and also if the player is in the mag it doesn’t move and try moving the pet closer to the player

isnt it from loomian legacy the embit? the pet is embit

Read above…
Yes it’s from Loomian Legacy.

2 Likes

bro i know someone called HowToRoblox pls check his pet system video it will 99.9% work for u

Just checked it out - That’s not the form of follow I’m looking for sorry.
As shown above, the moving is consistent and smooth.

2 Likes

What are you trying to achieve ???

1 Like

See above.

you can refer from dev references if u see there is something u need

From the desired example video, it looks like they only move the pet once the player is a certain distance from it, although the pet faces the player constantly.

I think using moveto is fine. I would try to only start the pet moving, when you are farther away from it, than the distance it will end up, when it follows you.

For example, only start the pet following when it is 10 studs away, but once it starts to follow, it will follow only stopping when it is 5 studs from you.

5 Likes

Also, set the network ownership of the pet to your player

All of the mentioned above are already being used - It’s still jumpy as shown.

In the last few minutes I threw together a place with a pet following. not sure how i could send it to you, but its running smoothly for me.