I’ve got hats working in my gamemode now, but for some reason, the hats dont appear if you re too close to a player.
if SERVER then
ENT.Type = “anim”
ENT.Base = “base_anim”
if CLIENT then
if self:GetOwner() != LocalPlayer() && self:GetOwner():Alive() && LocalPlayer():GetObserverMode() != OBS_MODE_IN_EYE then local Owner = self:GetOwner() local tbl = Owner:GetAttachment(Owner:LookupAttachment("eyes")) local Hatt = HatO[Owner:GetNWString("HAT")] self:SetRenderOrigin(tbl.Pos + Hatt.POS) self:SetAngles(tbl.Ang + Hatt.ANG) self:SetModelScale(Hatt.SCA) self:DrawModel() end end
HatO references a bunch of tables containing added positions/angles
Current, the code works well, but I need to know why the hats won’t render (on the client of course) when the two players are within a specific range.
If anyone could help, would be much appreciated.