• ClientSideModel deleted after lag?
    4 replies, posted
I'm trying to figure out why my clientsidemodel is getting deleted after lag and how to fix it. Does anyone have any experience with this? My code. [lua] local clothes = ClientsideModel("models/clothes1.mdl", RENDERGROUP_TRANSLUCENT) clothes:SetParent(ply) clothes:AddEffects(EF_BONEMERGE) ply:CallOnRemove("clothes",function() clothes:Remove() end) [/lua] [editline]25th May 2016[/editline] Okay I found out it's because of the CallOnRemove. I guess that's a bug? [editline]25th May 2016[/editline] Here's my solution... ply:CallOnRemove("clothes",function() if ply:IsValid() then clothes:SetParent(ply) else clothes:Remove() end end)
Yeah, your solution is to never call clothes:Remove() unless the player has disconnected.
Can't do that in client-side tho can you?
I mean that's what your code does.
O ok, I thought you were telling me to check isconnected() or something. I'll mark this as solved.
Sorry, you need to Log In to post a reply to this thread.