Please post your script as well as what it is you are trying to achieve.
I am setting up a script that should take my field content from the first layout and go to a second table and search if it has related records there. If so, it should take another fields content from the second table and paste that in in a field in the first layout. I have gotten this to work as a button but not as a triggered script...
Set Variable [$ID#; Value:ID#::id#_ID]
Go to Layout ["FREEZER" (FREEZER)]
Enter Find Mode
Set Field [FREEZER::id#_ID; "*"& $ID# &"*"]
Perform Find 
Set Variable [ $location; Value:FREEZER::location]
Go to Layout ["MAIN SCREEN" (ID#)]
Set Field [ID#::location in the freezer; $location]
I dont understand the point of doing this when you can just simply put the related field on the main layout.
BTW, the reason why your script kept firing was because each time it went to the layout, it fired. In your script you go to that layout with the scrip trigger, so it got stuck in an endless loop.
it is a long explanation why I need this...
but lets say that I do need it... I can I make it not to start the script when I go back to the layout....?
Okay so if you dont want ot put the related field of FREEZER::location on the Main layout, and for some reason you need to set the ID#::location in the freezer field, then you can just do: Set Field [ ID#::location in the freezer; FREEZER::location ]
But again this doesnt make any sense when there are multiple child records, as does your script since it will be on the first related record.