Why does the part keep replicating from the server even after it’s been deleted on the client side?
As you can see in the video, the Recv value spikes up to 1000, even though the part is no longer present on the client.
Client
local folder = workspace:WaitForChild('Folder')
folder.ChildAdded:Connect(function(part: Part)
local part2 = Instance.new('Part')
part2.Size = Vector3.one/2
part2.Anchored = true
part2.Position = part.Position
part2.BrickColor = BrickColor.Blue()
part2.Parent = workspace
part:Destroy()
while true do
part2.Position += Vector3.xAxis * 2 * task.wait()
end
end)
Server
local folder = workspace:WaitForChild('Folder')
for i = 1, 1000 do
task.defer(function()
local part = Instance.new('Part')
part.Size = Vector3.one/2
part.Anchored = true
part.Position = (5 + 1 * i) * Vector3.yAxis
part.BrickColor = BrickColor.Green()
part.Parent = folder
while true do
part.Position += Vector3.xAxis * 2 * task.wait()
end
end)
end
Well how would the server know the client removed the part and to stop replicating?
You should send instructions to clients to create the parts locally.
If you want to have a part in workspace that isn’t visible to clients, you can parent the parts to workspace.CurrentCamera on the server (a rather hacky and weird solution, but it works).
You are running 1,000 infinite loop threads in serial execution on both the client and server sides. I don’t know what is the exact issue, but it seems that receiving 1,000 KB/s is relatively normal given the extremely heavy task you are performing.
That is a separate problem from the replication rate, which is caused by replicating 1000 part positions constantly, but is definitely a problem that OP will want to mitigate.
I have some trouble in understanding what do you mean by replicating. Does OP expect that deleting the server parts in client side would stop the server from sending these server parts data to the client?