I am trying to make a safe zone but I don't know how I would set the humanoid's health to 100 every time it got damaged.
Assuming your "SafeZone" is a single part, you could do this:
ServerScript
local SafeZone = script.Parent SafeZone.Touched:Connect(function(hit) if hit and hit.Parent and game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) then hit.Parent:WaitForChild("Humanoid").Health = 100 end end)
You can also use the TakeDamage() function of Humanoids by using a negative number, where Line 5 would instead be
hit.Parent:WaitForChild("Humanoid"):TakeDamage(-100)