How do I prevent people from spawning horses in the middle of town

Hi guys! I’m making a cowboyish game and I find that players will spawn their horses in the middle of town because that is where they begin to explore the menus, I was wondering if there was a way to prevent this other than spreading out players

I thought maybe I could make it so the player could only spawn their horses at hitching posts, but I thought then that if they were in the wilderness and their horse died it would seem very unfair.

You could define a position somewhere in the town and make it so that anyone within a certain distance from this point cannot spawn a horse.

Using a “spawn box” would be the simplest solution.