I like game is 10/10, i thing is like Baldi. What you can do is to but use a rigidbody at enemy, i thing you use transform.pozition and enemy can go to the walls
Change the script to: add a rigidbody and use it to move (replace the transform.pozition to rb.AddForce)