Hey guys, me and a friend are currently working on a gamemode for our server, its RP based. We have setup a character creation menu, when you go to select a model you click an icon and the script should asign that model for you however it doesn’t we are having trouble with this part of the script:
[lua]local Icon1 = vgui.Create( “SpawnIcon”, DermaList )
Icon1:SetModel( “models/humans/group01/male_01.mdl” )
DermaList:AddItem( Icon1 )
Icon1.DoClick = function()
DermaPanel:SetVisible( false )
Self:SetModel( “models/Humans/group01/male_03” )
RunConsoleCommand( “team_3” )
end[/lua]
It just won’t set the model that is shown there. Always reverts back to the gray one. We have tryed using the GM:SetModel and Ply:SetModel and as you can see we have also used self but we always get this error in console
[lua]PTRP\gamemode\cl_charcreate.lua:79: attempt to index global ‘Self’ (a nil value)[/lua]
If i haven’t explained this clearly enough just say so and ill have another crack but any help is appreciated