How to get enemy Rigid body to move?

I am making a pop up shooter game and was wondering how to have one of the enemies to slightly pop out from behind a tree for a short period of time before going back behind the tree. Any ideas what type of script to use ? I am abit inexperienced with unity so be warned.

well you take the enemy script (dunno if you have different ones or just one type, but for now i’ll go for just this 1 enemy type)

in it you put a Stopwatch (which will work by adding “using System.Diagnostics;” at the top) for the timing.

then you use this.rigidbody.transform.position = Vector3.Lerp();

for more info: Unity - Scripting API: Vector3.Lerp