player model hands dont work

So Im using the tron anon player model which comes up with playermodel and hands for pointshop ( only playermodel works the hands dont.)
I dont know how to make it work
this is the code for the actuall playermodel.lua


player_manager.AddValidModel( "Tron Anon", 		"models/player/anon/anon.mdl" );
list.Set( "PlayerOptionsModel", "Tron Anon", 	"models/player/anon/anon.mdl" );
player_manager.AddValidHands( "Tron Anon", "models/weapons/arms/anon_arms.mdl", 0, "00000000" )

and the pointshop script


ITEM.Name = 'Tron Anon'
ITEM.Price = 45000
ITEM.Model = 'models/player/anon/anon.mdl'




function ITEM:OnEquip(ply, modifications)
	if not ply._OldModel then
		ply._OldModel = ply:GetModel()
	end
	
	timer.Simple(1, function() ply:SetModel(self.Model) end)
end

function ITEM:OnHolster(ply)
	if ply._OldModel then
		ply:SetModel(ply._OldModel)
	end
end

function ITEM:PlayerSetModel(ply)
	ply:SetModel(self.Model)
end

function ITEM:Think(ply, modifications)
	if ply:KeyDown(IN_JUMP) then
		ply:SetVelocity(ply:GetUp() * 6)
	end
end


how to get it so that once I buythe playermodel from the store after equipping players see the model + hands(so far only model works hand dont)

Unrelated, but you don’t need this anymore:



list.Set( "PlayerOptionsModel", "Tron Anon", 	"models/player/anon/anon.mdl" );

The hands don’t work probably because you set the playermodel to a new one AFTER the hands were created.

I dont understand can you explain more?
how do I set them the wrong way?

Pointshop is setting the model after the hands were created, meaning it won’t work.

so there is no way of making this work? is there another way of doing it like making the hands seperate from the models? and add them seperately?

Try calling ply:SetupHands() after you set the new model.

I too have the same problem where the hands aren’t working. How would I do what you just mentioned. (i’m not too good with scripts)

Put that after the ply:SetModel()

I don’t have that I only have ply:SetModel(self.Model) but I did it anyway I put ply:SetupHands() after ply:SetModel(self.Model) and it doesn’t seem to work :confused:

You can try this:
ply:SetModel()
ply:GetHands():Remove()
ply:SetupHands()

Nope doesn’t seem to work

You might need to put this: ( ONCE, serverside, autorun )



hook.Add( "PlayerSetHandsModel", function ( pl, ent )
   local simplemodel = player_manager.TranslateToPlayerModelName(pl:GetModel())
   local info = player_manager.TranslatePlayerHands(simplemodel)
   if info then
      ent:SetModel(info.model)
      ent:SetSkin(info.skin)
      ent:SetBodyGroups(info.body)
   end
return false
end )

I will see into making it like that by default. What gamemode do you run btw?

I’ve been working at this the past couple of days and can’t seem to figure it out. I know it’s silly to fret over such a thing, but I have some sort of OCD about it. I stumbled across this thread today and humbly request assistance.

My issue lies with the Miku, Luka, Teto, Neru and Haku player models created by captainbigbutt. I’ve messed around with the bit of code you posted above, but I’m unsure where to place it. I’ve tried both the playermodel.lua in autorun as well as the pointshop script to no avail.

Here are the untouched playermodel.lua:


--Add Playermodel
--list.Set( "PlayerOptionsModel", "Tda Hatsune Miku Append", "models/captainbigbutt/vocaloid/miku.mdl" )
player_manager.AddValidModel( "Tda Hatsune Miku Append", "models/captainbigbutt/vocaloid/miku.mdl" )
player_manager.AddValidHands( "Tda Hatsune Miku Append", "models/captainbigbutt/vocaloid/c_arms_miku.mdl", 0, "00000000" )

--Add NPC
local NPC =
{
	Name = "Tda Hatsune Miku Append",
	Class = "npc_citizen",
	KeyValues = { citizentype = 4 },
	Model = "models/captainbigbutt/vocaloid/miku.mdl",
	Category = "Vocaloid"
}

and the pointshop script:


ITEM.Name = 'Miku'
ITEM.Price = 250
ITEM.Model = 'models/captainbigbutt/vocaloid/miku.mdl'

function ITEM:OnEquip(ply, modifications)
	if not ply._OldModel then
		ply._OldModel = ply:GetModel()
	end
	
	timer.Simple(1, function() ply:SetModel(self.Model) end)
end

function ITEM:OnHolster(ply)
	if ply._OldModel then
		ply:SetModel(ply._OldModel)
	end
end

function ITEM:PlayerSetModel(ply)
	ply:SetModel(self.Model)
end

I’ve tried this in sandbox, prop_hunt and terrortown. None of them display the hands properly when using pointshop. They will either display the default hands or no hands at all if I mess around with the scripts too much. I’ve only started using Garry’s Mod earlier this week, so excuse me if I get a bit confused.

Pointshop is having some issues with hands :’(