Would this impact the server's performance speed?

Hello Developers,
I’ve been working on a set of custom Humanoid characters, and I’d like them to follow the player on every movement.
I’ve already managed to do the animation by firing a remote to all players to load the animation.

But the problem is about the movement.
I’ve been thinking about whether to make them move from Server or Client.

What I’ve thought of doing is to hook up a connection to RunService.Heartbeat to check constantly if the player moved and move the humanoid (using Humanoid.WalkToPoint property).

Now, the problem is that if many players are in-game, then the server will be loaded with many connections.

Would these connections that change the property impact the speed and create lag? Or is it fine to do?
Please let me know if you have more ways/ideas to achieve this.

I don’t have any code prepared as I am still considering how to do that.

The higher the amount of Characters you run on server the laggier it will be, my suggestion is to set your Characters’ NetworkOwnership to the Player they are following and run the movement on that specific client.

1 Like

I assumed that, which is why I asked.

That’s interesting, I didn’t know such a thing exists.
Thanks for letting me know :slightly_smiling_face:. I’ll try that when I can and will mark your post as solved if works.

Hey, how would you set the network ownership of a model?

Just loop through it and set for every part?

You set the root part of the model’s networkship with Part:SetNetworkOwner(Player)

So for example you would do Character.PrimaryPart:SetNetworkOwner(Player)

1 Like