it seems have some problem while TrainingPlayer in freeroam,so the better way is if PedIsPlaying(gplayer,"/Global/Player/Attacks/Strikes/LightAttacks",true) then
PedSetActionNode(gplayer,"/Global/TrainingPlayer/Attacks/Strikes/LightAttacks","act/anim/TrainingPlayer.act")