Help with pet movement replicating to other players

Hello! I was working on pet movement for my pet system, and I came to an issue. I want to replicate the pet movement so that the other players can see it so, I attempted to use network owner however in order for the pet movement to work I need the primary part to be anchored so, I cant use that. If anyone would help me out on finding a solution to this that would be great!

Thanks for reading! :grinning_face_with_smiling_eyes:

Send the movement commands to the server using remote events and have the server move the pet

How would I be able to pull this off?

You might wanna read this: Client-Server Runtime | Documentation - Roblox Creator Hub

Then this: Bindable Events and Functions | Documentation - Roblox Creator Hub

The pet movement runs on heartbeat so, the problem is I can’t be firing a remote event every heartbeat

1 Like

If he was to make the movement be controlled with remote events, the players would quickly go over the max amount of remote events you can fire in a given time.

Well, don’t send updates every frame then :slight_smile:

Or just set it from the server in the first place. Something along the lines of

game:GetService("RunService").Stepped:Connect(function()
	for _, player in pairs(game:GetService("Players"):GetPlayers()) do
		local pet = GetPetForPlayer(player) -- idk how you personally store this
		pet:MoveTo(player.Character.HumanoidRootPart)
	end
end)

It’s fine I already figured it out:)

I know this is an old thread, but would you be able to share how you managed this? I just overhauled my pet system, and it’s looking much better now, but I’m not sure how I can replicate it to the server since I’m using renderstepped and anchored parts

1 Like

I think for this specific system I actually handled all the movement replication on the client. All I did was use a loop to go through the current pets in the workspace for all players then display them accordingly(if that makes any sense)