Answers for "Check region for players"

0

Check region for players

local Part = script.Parent
Part.Touched:Connect(function() end) -- Just for a TouchInterest to occur on a CanCollide false part

function CheckIfPlayerIsInArea(Part,Character)
    local touching = Part:GetTouchingParts()
	for i=1,#touching do
		if touching[i] == Character.HumanoidRootPart then
			return true
		end
	end
	return false
end
Posted by: Guest on October-12-2021

Browse Popular Code Answers by Language