It depends on the rules set forth by the authorities in your local community. But you might need a lockable barrier that passes the criteria stated in the ASTM F 1346. You can ask your local government or the homeowners association in your neighborhood if there are any specific rules regarding hot tub fences.  A common fence is at least 4 ft in height and should not be scalable. Some communities require a concrete wall to be built around the hot tub. It must only have one access point and should not be easily climbed on but strong enough to take the weight of a full-grown person.  They are quite heavy expenses but they also serve as additional protection for you and anyone else who will use your hot tub.