How can I get a model that is moved on the client, to be moving for all clients

I have a model that spawns in on the server, and the client handles all movement, as the nodes to move to are all created on the client. Problem with this is, everyone’s models just stay standing there, while just your own actually moves. I want everyones models to move, but still keep the movement all handled client side.

My fear is, having to go to server (every single renderstepped) with a position, then server goes to all clients with that position. Now imagine 20-30 people, each with their own model, every renderstepped having to update positions for everyones models.

So is there an easy way to spawn something on the server, have it run client side, but movement still be tracked for all clients? Unsure if network ownership would work, as the model is made up of several parts that are anchored and welded together.

Client - server - all clients

Simple.

Quick approach to this, I don’t know how you are going to pull this off but you can perhaps use RemoteEvents and FireAllClient from the server for the movement

This obviously wouldn’t work if you fire in a loop, though

Clearly you ignored everything I said in my question and just went for the quick reply :roll_eyes: please read my question before answering

apologies. This might not be your solution because I forgot how it works but SetNetworkOwnership I guess.

Also you could’ve just fired the remote everytime position changes instead…

local replicated = game:GetService("ReplicatedStorage")
local bindable = replicated:WaitForChild("BindableEvent")

bindable.Event:Connect(function(model, position)
	model:PivotTo(position)
end)

How feasible would a BindableEvent “.Event” event listener be?

The model’s initial movement would be handled by a single client that then fires some BindableEvent which replicates that movement to every other client.

Yep definitely fire all clients, but not quite.

And you can definitely be smarter than to fire all clients every render step.

I’m going to show some secret footage from my commission, hopefully it should be ok since I did the client sided NPC’s with the goal of replicating something like Retail Tycoon.

  1. Instead of firing all clients, try to always reduce it. Personally I have set it to fire to only a specified table of clients that are interested in the NPC workers when you are visiting the other clients plot. I have no idea if this applies to your scenario.

  2. Instead of firing every renderstep, I only fire when the target position moves where I sent out a table of position value for the model to be tweened forwards, ex moving from cell A to B. Reduce the amount of information being sent out using interpolation and such, instead of A, B, C, D try to do A → D directly. Currently, my system is still using A, B, C, D with a table of all the vector paths but I can easily switch to client sided and do pathfinding locally since it uses A star system.

  3. Server should be the one controlling the movement overall especially for my system. Not sure about yours, you could just achieve the same effect with a client → server.

Overall this question seems like premature optimization. You can definitely find ways to optimize it later and find ways to achieve it with less steps, and Do you really need to do all that work in the first place?