// 713: GetStandardFaction
// Find out which standard faction oObject belongs to.
// * Returns a mystical
INVALID_STANDARD_FACTION if oObject does not belong to
// a Standard Faction, or an error has occurred.
The only two things I can think of is that "n_dan_student1" isn't a valid tag or that the commands may need delaying.
Try inserting this after you initialize oStud1 to test the validity of your tag.
SendMessageToPC(oPC, "oStud1 is not valid");
If that doesn't generate an message in your feedback, try a DelayCommand of 0.2 on the ChangeToStandardFaction and a delay of 0.4 on the GetStandardFaction message line.