1

How would I go by making a script for a no - damage zone?

I have tried to write gear removers but they haven't worked. I wanna know how i would go by making a block that would make it so that you can't deal any damage with a sword.

0
MattVSNNL 133
15 days ago

Try this

Add a script into the part

script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.MaxHealth = math.huge
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.MaxHealth
end
end)

script.Parent.TouchEnded:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.MaxHealth = 100
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.MaxHealth
end
end)

0
Thanks! I'll try that. epic_hen9 25 — 14d
0
:) MattVSNNL 133 — 12d