Yes - you could be experiencing record locking.
What is the table that this layout is based on? Is there more than one record in this table? Are all the teachers logging in to the same record? Only one person can work in any one record at a time, and in certain cases, related records may also be locked.. You can Google "FileMaker record locking" to find a bunch of discussions and articles about this issue.
You could add some script steps to make sure the teacher is not in a record that is already in use, or do some error trapping before posting the deposit, or some other method to avoid locking if this is the issue.
Each advisor pulls up only their advisee students. So teacher A will see only his students on the page. The script that goes to this page brings up only Teacher A's students.
The layout is base on the students table, sorted by advisor. There is more than one record - its in list view. Its a place for the advisor to see all her students and mark attendance, breakfast, behavior, etc.
I thought record locking only occured on the same record (which we've experienced here. People forget to click out of a record), not on records from the same table.
The script has been rebuilt a few times. Not sure why its having problems.
One more thing that just occured to me: When a script grabs the id from one student, goes to the checking table and creates a record there, then goes BACK to the original layout, I have assumed that it simply goes to the same record that it was on before it went to the 2nd layout. I have to test that and see if that's the case.
If it's a list view, then you can still have issues if the user has a cursor in a field while clicking the button. If the deposit amount hasn't been committed, then the new record creation can fail.
Add a commit record step to the script as the first item. Another thing to check is if the record IS being created, but not including all the appropriate data from the student temp record. If the record creation step is failing, then it could be several things, first to check would be permissions. I would try adding error checking to the record creation step as well - if there is any error, save that info somewhere (I actually set up SMTP to send me an email with those kinds of errors and describe the user, the layout, the action and the error number... - that really helps).
And yes, if it leaves the original layout and returns there, it should be going back to the same record
If you can't get there with these suggestions, you might try posting the script..