Unable to cast Instance to Region3
local region = game.Workspace.RegionPart
local pos1 = region.Position - (region.Size/2)
local pos2 = region.Position + (region.Size/2)
local Area = Region3.new(pos1, pos2)
while true do
Debounce = true
wait()
local PartInRegion = workspace:FindPartsInRegion3(region, nil, 1000)
for i, part in pairs(PartInRegion) do
if part.Parent:FindFirstChild("Humanoid") ~= nil then
Debounce = false
print("Player Found"..part.Parent.Name)
local Workspace = part.Parent
Workspace.Humanoid:TakeDamage(Workspace.Humanoid.MaxHealth)
Debounce = true
end
end
end

1 comment
Error is above line 10 or on it...