how do you make it so you don't go past waters edge

i found the barrier device but i am not understanding how to do the rest… sorry to be a bother