Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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.

1 answer

✓ Accepted answer

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)

2 comments

0

Thanks! I'll try that.

0

:)

This discussion is preserved as it was. New answers, comments, and votes are closed.