Fix local friend variable scope in playtime observer