Ive been attempting to make an automatic door, and for a long time ive been confused as to why the door is opening and closing back and forth, and ive finally realized its because of how I am detecting if a player in within a region 3. (I can elaborate if you want, but im positive that this detection is the problem)
local func2 = function()
local list = game.Workspace:FindPartsInRegion3(Region1, TDF)
for i, v in pairs(list) do
if v.Parent:FindFirstChild("Humanoid") ~= nil then
playerfound = true
else
playerfound = false
end
end
end
Problem is, I dont know of any other way to detect if a player is within a region 3. And just to clarify I am working off of the players character, so I cant just check if its a child of the player service.

1 comment
if v.Name == "HumanoidRootPart" is the best way to check for player as the root part is his main part.