I wonder if anyone else has noticed this happening to them. I haven't found the cause, but its happened about a dozen times over the last month.
I have a water.lua script which has as its first line.
Script.CameraOrPlayer=nil--entity
This creates a CameraOrPlayer box on the Scene - Script tab.
I drag and drop the Player from the list of items in the Scene to the box, and the box now says Player.
All is fine for a while and I repeat my programming / testing cycle without issue, until it says it can't run the water.lua script because CameraOrPlayer is a nil value.
When I check the Scene Script CameraOrPlayer box, I find that its empty, and have to re-drag Player back into it. Then its alright again for a while.