You can probably use a Region3 to detect if a player entered the area and give them a sword, and if they leave remove the sword
ZonePlus should help you do what is required as it has events for when you Enter a region3 and leave a region3
Although this method will s till allow you hurt people who are slightly close to the zone but not touching it. You could add a BoolValue into a player that determines if they can be hurt that changes if you’re in the region or not and make the sword check the value of it before damaging