Kill all players in a certain area

I wanted to make a button that kills everyone in a certain area when someones press it.
The problem is that, no players are being killed.
I tried using Region3 but it doesn’t seems to work.

There is the script i’ve tried so far:


local Point1 = Vector3.new(-289.444, 95.512, -84.533)
local Point2 = Vector3.new(-955.267, -148.882, 627.907)
local Region = Region3.new(Point2,Point1)

function onClicked()
	for _, part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
		local hum = part.Parent:FindFirstChild("Humanoid")
		if not hum then continue end
		hum.Health = 0
	end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
1 Like

ZonePlus should suffice. It works great. Try it out!

3 Likes