Hi, I'm trying to detect if there is a player that is not in region3, but I don't understand how!
local Region = Region3.new(Vector3.new(258, -47, -99), Vector3.new(348, -23, 99))
local Workspace = game:GetService("Workspace")
while wait(1) do
local PartsInRegion = Workspace:FindPartsInRegion3(Region)
for _,Child in pairs(PartsInRegion) do
if Child:IsA("BasePart") then
local BasePart = Child
if BasePart and BasePart.Parent then
if BasePart.Parent:FindFirstChild("Humanoid") then
local Character = BasePart.Parent
local Humanoid = Character.Humanoid
local Players = game:GetService("Players")
local Player = Players:GetPlayerFromCharacter(Character)
if Player then
local BoolValue = Character:WaitForChild("IsFighting")
BoolValue.Value = true
end
end
end
end
end
end

2 comments
Works!
Make sure to add you code to that script and have fun! Glad it worked!