local C=game:GetService("\082\117\110\083\101\114\118\105\099\101")local J=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local E=require(J.Shared.components)local l=C:IsServer()and"\115\101\114\118\101\114\069\110\116\105\116\121\073\100"or"\099\108\105\101\110\116\069\110\116\105\116\121\073\100"local function f(C)for C,J in C:queryChanged(E.Model)do if J.new then J.new.model:SetAttribute(l,C)end end end return f
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Components = require(ReplicatedStorage.Shared.components)

local name = RunService:IsServer() and "serverEntityId" or "clientEntityId"

local function updateModelAttribute(world)
	for id, record in world:queryChanged(Components.Model) do
		if record.new then
			record.new.model:SetAttribute(name, id)
		end
	end
end

return updateModelAttribute
