Just hook the global function rather than trying to localise it first. Other than that, without the actual code it's a bit hard to tell what might be going on.
PLAYER_LOGIN fires after all the ADDON_LOADEDs and before PLAYER_ENTERING_WORLD and only fires once.
|