Fixing my safezone script for a swordfighting game!

I made notes as im learning how to script and have been trying to make a safezone, when I enter the safezone I cannot die and after leaving its radius or no longer being inside of it I still have infinite health

For stuff like this, I recommend just using zoneplus module or using Roblox’s region3

you have a typo on line 26, “Maxhealth”