local O=require("\064\115\104\097\114\101\100\047\102\114\097\109\101")local c=require("\064\110\101\116\047\099\108\105\101\110\116")local M=require("\064\115\104\097\114\101\100\047\119\111\114\108\100")local y=require("\064\115\104\097\114\101\100\047\099\111\109\112\111\110\101\110\116\115")return O.on("\111\117\116\103\111\105\110\103\095\110\101\116",function()for O,M,y in(M:query(y.SimulatedRig,y.Networked)):iter()do local w=M.root.CFrame.Position local J,X,N=M.root.CFrame:ToOrientation()c.send_local_position.fire({position=w,y_rot=X})end end)
local frame = require("@shared/frame")
local network = require("@net/client")
local world = require("@shared/world")
local components = require("@shared/components")

return frame.on("outgoing_net", function()
	for _, LocalHumanoid, Networked in world:query(components.SimulatedRig, components.Networked):iter() do
		local position = LocalHumanoid.root.CFrame.Position
		local _, y_rot, _ = LocalHumanoid.root.CFrame:ToOrientation()

		network.send_local_position.fire({
			position = position,
			y_rot = y_rot,
		})
	end
end)
