Get the players active weapon

How would I get the players active weapon name?
like weapon_mad_ak47.
I’ve tried with ply:GetActiveWeapon():GetName() but this doesn’t give me anything at all.

GetClass, GetPrintName