hook PlayerLoadout - nil value problem



function dgive( ply )
        ply:give( "weapon_name" )
end
hook.Add( "PlayerLoadout", "DGive", dgive )


So I am trying to give players a weapon when they spawn but I keep getting an error saying I am providing a nil value but the weapon name I give it is correct.
attempt to call method ‘give’ (a nil value)

Oh and it doesn’t matter if I try to do it by hooking PlayerSpawn

the function is Give() not give()

You should check the error’s page on the wiki, it should help you debug.