Advance duplicating question

My entity doesn’t save any networked variables (when I advance duplicate it) that are assigned to it with a tool. People can’t even use it in any duplications. What do I do to make them save when duplicated?

[lua]
– Serverside
function ENT:BuildDupeInfo()
local info = self.BaseClass.BuildDupeInfo(self) or {}

if self:GetNWString("myVar") ~= "" then
	info.myVar = self:GetNWString("myVar")
end

return info

end

function ENT:ApplyDupeInfo(ply, ent, info, GetEntByID)
self.BaseClass.ApplyDupeInfo(self, ply, ent, info, GetEntByID)

self:SetNWString("myVar",info.myVar)

end
[/lua]

Hope that helps :biggrin:

You’re always such a help. Thank you!

I can’t get this right, but I should be able to soon…